コード例 #1
0
 /**
  * @covers WindowsAzure\Table\Models\Filters\QueryStringFilter::__construct
  * @covers WindowsAzure\Table\Models\Filters\QueryStringFilter::getQueryString
  */
 public function testGetQueryString()
 {
     // Setup
     $expected = 'x';
     $filter = new QueryStringFilter($expected);
     // Assert
     $this->assertEquals($expected, $filter->getQueryString());
 }
コード例 #2
0
 public function testCheckQueryStringFilter()
 {
     $filter = new QueryStringFilter(null);
     $this->assertNotNull($filter, 'Default $filter');
     $this->assertNull($filter->getQueryString(), 'Default QueryStringFilter->getQueryString');
     $queryString = 'foo';
     $filter = new QueryStringFilter($queryString);
     $this->assertEquals($queryString, $filter->getQueryString(), 'Set QueryStringFilter->getQueryString');
     // Now check the factory.
     $queryString = 'bar';
     $filter = Filter::applyQueryString($queryString);
     $this->assertEquals($queryString, $filter->getQueryString(), 'QueryString factory QueryStringFilter->getQueryString');
 }