ImboUnitTest\EventListener\MetadataCacheTest::testStoresDataInCacheWhenResponseCodeIs200 PHP Метод

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

    public function testStoresDataInCacheWhenResponseCodeIs200()
    {
        $lastModified = new DateTime();
        $data = ['some' => 'value'];
        $this->cache->expects($this->once())->method('set')->with($this->isType('string'), ['lastModified' => $lastModified, 'metadata' => $data]);
        $model = $this->getMock('Imbo\\Model\\ArrayModel');
        $model->expects($this->once())->method('getData')->will($this->returnValue($data));
        $this->response->expects($this->once())->method('getStatusCode')->will($this->returnValue(200));
        $this->response->expects($this->once())->method('getLastModified')->will($this->returnValue($lastModified));
        $this->response->expects($this->once())->method('getModel')->will($this->returnValue($model));
        $this->listener->storeInCache($this->event);
    }