Inheritance: extends Bolt\Legacy\Storage
Example #1
0
 public function testGetContentReturnSingleLimits1()
 {
     $app = $this->getApp();
     $app['request'] = Request::create('/');
     $db = $this->getDbMockBuilder($app['db'])->setMethods(['fetchAll'])->getMock();
     $app['db'] = $db;
     $db->expects($this->any())->method('fetchAll')->willReturn([]);
     $storage = new StorageMock($app);
     // Test returnsingle will set limit to 1
     $storage->getContent('entries', ['returnsingle' => true]);
     $this->assertSame(1, $storage->queries[0]['parameters']['limit']);
 }