ApiPlatform\Core\Tests\Annotation\PropertyTest::testAssignation PHP Method

testAssignation() public method

public testAssignation ( )
    public function testAssignation()
    {
        $property = new ApiProperty();
        $property->description = 'description';
        $property->readable = true;
        $property->writable = true;
        $property->readableLink = true;
        $property->writableLink = true;
        $property->required = true;
        $property->iri = 'http://example.com/prop';
        $property->identifier = true;
        $property->attributes = ['foo' => 'bar'];
        $this->assertEquals('description', $property->description);
        $this->assertTrue($property->readable);
        $this->assertTrue($property->writable);
        $this->assertTrue($property->readableLink);
        $this->assertTrue($property->writableLink);
        $this->assertTrue($property->required);
        $this->assertEquals('http://example.com/prop', $property->iri);
        $this->assertTrue($property->identifier);
        $this->assertEquals(['foo' => 'bar'], $property->attributes);
    }
PropertyTest