ImboUnitTest\EventListener\MetadataCacheTest::testStoresDataInCacheWhenResponseCodeIs200AndHasNoModel PHP Method

testStoresDataInCacheWhenResponseCodeIs200AndHasNoModel() public method

    public function testStoresDataInCacheWhenResponseCodeIs200AndHasNoModel()
    {
        $lastModified = new DateTime();
        $this->cache->expects($this->once())->method('set')->with($this->isType('string'), ['lastModified' => $lastModified, 'metadata' => []]);
        $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(null));
        $this->listener->storeInCache($this->event);
    }