Пример #1
0
 /**
  * Test Dataset\Implementation::getResourceClass() for totalCount and flags arguments
  */
 public function testEntitySet_Args()
 {
     $entitySet = \Jasny\call_private_method(Dataset::class, 'entitySet', [], 22, 256);
     $this->assertInstanceOf(EntitySet::class, $entitySet);
     $this->assertSame(22, $entitySet->countTotal());
     $this->assertSame(256, \Jasny\get_private_property($entitySet, 'flags'));
 }
Пример #2
0
 /**
  * This if the constructor has added our middleware
  */
 public function testConstructor_HasMiddleware()
 {
     $client = new Client('http://www.example.com');
     $handler = $client->getConfig('handler');
     $stack = \Jasny\get_private_property($handler, 'stack');
     $names = array_column($stack, 1);
     $this->assertContains('bind_uri', $names);
     $this->assertContains('last_response', $names);
     $this->assertContains('parse', $names);
 }