| 1 | <?php |
||
| 7 | class ReferenceTest extends \PHPUnit_Framework_TestCase { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @var Reference |
||
| 11 | */ |
||
| 12 | protected $object; |
||
| 13 | |||
| 14 | /** |
||
| 15 | */ |
||
| 16 | protected function setUp() { |
||
| 19 | |||
| 20 | protected function getContainer() { |
||
| 21 | $container = new Container(); |
||
| 22 | $container->set('test.param', 'parameterValue'); |
||
| 23 | $container->set('callable', function($c) { return 'callValue'; }); |
||
| 24 | $container->set('shared', function($c) { $a = new \stdClass(); $a->mt = microtime(true); return $a; }, true); |
||
| 25 | |||
| 26 | return $container; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | */ |
||
| 31 | public function testGetterAndSetter() { |
||
| 32 | $this->assertEquals("testRef", $this->object->getName()); |
||
| 33 | $this->object->setName("testRefName"); |
||
| 34 | $this->assertEquals("testRefName", $this->object->getName()); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | */ |
||
| 39 | public function test__toString(){ |
||
| 42 | |||
| 43 | public function testBasicInvocation() |
||
| 44 | { |
||
| 48 | |||
| 49 | public function testInvocationError() |
||
| 54 | } |
||
| 55 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.