Bolt\Tests\Storage\StorageTest::testGetContentReturnSingleLimits1 PHP Метод

testGetContentReturnSingleLimits1() публичный Метод

    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']);
    }