mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-11 17:34:09 +02:00
PSR-0 with tests
This commit is contained in:
25
Tests/Composite/FormTest.php
Normal file
25
Tests/Composite/FormTest.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DesignPatternPHP
|
||||
*/
|
||||
|
||||
namespace DesignPatterns\Test\Composite;
|
||||
|
||||
use DesignPatterns\Composite;
|
||||
|
||||
/**
|
||||
* FormTest tests the composite pattern on Form
|
||||
*/
|
||||
class FormTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function testRender()
|
||||
{
|
||||
$form = new Composite\Form();
|
||||
$form->addElement(new Composite\TextElement());
|
||||
$form->addElement(new Composite\InputElement());
|
||||
echo $form->render();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user