/** * @covers MicrosoftAzure\Storage\Table\Models\Filters\PropertyNameFilter::__construct * @covers MicrosoftAzure\Storage\Table\Models\Filters\PropertyNameFilter::getPropertyName */ public function testGetPropertyName() { // Setup $expected = 'x'; $filter = new PropertyNameFilter($expected); // Assert $this->assertEquals($expected, $filter->getPropertyName()); }
public function testCheckPropertyNameFilter() { $filter = new PropertyNameFilter(null); $this->assertNotNull($filter, 'Default $filter'); $this->assertNull($filter->getPropertyName(), 'Default PropertyNameFilter->getPropertyName'); $propertyName = 'foo'; $filter = new PropertyNameFilter($propertyName); $this->assertEquals($propertyName, $filter->getPropertyName(), 'Set PropertyNameFilter->getPropertyName'); // Now check the factory. $PropertyName = 'bar'; $filter = Filter::applyPropertyName($propertyName); $this->assertEquals($propertyName, $filter->getPropertyName(), 'PropertyName factory PropertyNameFilter->getPropertyName'); }