/** * testImage * * @return void */ public function testImage() { $image = array('id' => 'e479b480-f60b-11e1-a21f-0800200c9a66', 'model' => 'Test', 'path' => 'test' . DS . 'path' . DS, 'extension' => 'jpg', 'adapter' => 'Local'); $entity = $this->FileStorage->newEntity($image, ['accessibleFields' => ['*' => true]]); $result = $this->Storage->url($entity); $expected = 'Test/5c/39/33/e479b480f60b11e1a21f0800200c9a66/e479b480f60b11e1a21f0800200c9a66.jpg'; $this->assertEquals($result, $expected); }