* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\PropertyInfo\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\PropertyInfo\PropertyInfoExtractor; use Symfony\Component\PropertyInfo\Tests\Fixtures\DummyExtractor; use Symfony\Component\PropertyInfo\Tests\Fixtures\NullExtractor; use Symfony\Component\PropertyInfo\Type; /** * @author Kévin Dunglas */ class AbstractPropertyInfoExtractorTest extends TestCase { /** * @var PropertyInfoExtractor */ protected $propertyInfo; protected function setUp() { $extractors = array(new NullExtractor(), new DummyExtractor()); $this->propertyInfo = new PropertyInfoExtractor($extractors, $extractors, $extractors, $extractors); } public function testInstanceOf() { $this->assertInstanceOf('Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface', $this->propertyInfo); $this->assertInstanceOf('Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface', $this->propertyInfo); $this->assertInstanceOf('Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface', $this->propertyInfo); $this->assertInstanceOf('Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface', $this->propertyInfo); } public function testGetShortDescription() { $this->assertSame('short', $this->propertyInfo->getShortDescription('Foo', 'bar', array())); } public function testGetLongDescription() { $this->assertSame('long', $this->propertyInfo->getLongDescription('Foo', 'bar', array())); } public function testGetTypes() { $this->assertEquals(array(new Type(Type::BUILTIN_TYPE_INT)), $this->propertyInfo->getTypes('Foo', 'bar', array())); } public function testIsReadable() { $this->assertTrue($this->propertyInfo->isReadable('Foo', 'bar', array())); } public function testIsWritable() { $this->assertTrue($this->propertyInfo->isWritable('Foo', 'bar', array())); } public function testGetProperties() { $this->assertEquals(array('a', 'b'), $this->propertyInfo->getProperties('Foo')); } } __halt_compiler();----SIGNATURE:----qh2LGi87i+L7sehfYdrv6Gn1K58bEuUXxL75tv9kFRwMYw7NeNnSqDYRUwgxE5wcFsVseD3TzLxO0D2uymR1Omn3HoFjG9IMaenCFpveJEEWQ5DspBHbIqNKfMteUTCcTO28XrfTGD/Kkr4GbpAyuSbzGgqh2o9Bg9UmXqnmRgq22vvzbr2KhlimNa6aOtPxGagSnmK4QvY15JxGO3BlM6TKG6B7etN9h44QJ1JDwzBtBIepgjbT4baCjNPt+q3SNqjay2T7pqAQKmLY+h0fiRBPAANhUMkTNt37Bd8bwMDmaYyqQ+00z9Vt0CeIRbhLPxG+dGSceHsl8MqN5cHvlHU0OrREKqzmJPGXjKDRWvcJpxlTXCo1Yl5wQu+psx7hs0ZMBeDM49tllR4dj4RpnYKjhpK3cNa0gm2q/NI6R7f+4zrxYXH/iO7rF5c963ID7q4mm5YchDlOJbSoA5jtaxyGM/wD/ztsi6S74MzU033tJ/Gl6oVYqv3lgR92R5sakPBQb/ivda9cIQMWC1e/VRW1B3HIoI5EPjRU34Fwz4zF6hSexhY7cIKJkgSiNE0amgDD56j36yF2nBmw3ziTMSL1wlQuobo1MbzujbMs9eL1xMXvY3bydOJiJZROQJsZbcd55rv7hS8trDnJc3d7U/GZuzNBBmUk4Lcf40H8WFg=----ATTACHMENT:----NDU1MDg1NzMzMDQ2OTUyMyA0NDMyNjgyNTc2NjQ5MjY5IDgwNjM3Nzk2Mjg2MjgzMzM=