| @@ 133-145 (lines=13) @@ | ||
| 130 |         $this->assertEquals(new \DateTime('2016-01-01 00:00:00'), $article->date); | |
| 131 | } | |
| 132 | ||
| 133 | public function testObject() | |
| 134 |     { | |
| 135 | $this->initGeneralArticle(); | |
| 136 | ||
| 137 | $article = new Article(); | |
| 138 | $article->image = $this->createImage( | |
| 139 | '/path/to/image', 100, 200, 'image/jpeg' | |
| 140 | ); | |
| 141 | $article = $this->persistAndReloadArticle($article); | |
| 142 | $this->assertInstanceOf(Image::class, $article->image); | |
| 143 | $this->assertEquals(100, $article->image->width); | |
| 144 |         $this->assertEquals('image/jpeg', $article->image->mimetype); | |
| 145 | } | |
| 146 | ||
| 147 | public function testObjectCollection() | |
| 148 |     { | |
| @@ 87-97 (lines=11) @@ | ||
| 84 |         $this->assertEquals(new \DateTime('2016-01-01 00:00:00'), $article->date); | |
| 85 | } | |
| 86 | ||
| 87 | public function testObject() | |
| 88 |     { | |
| 89 | $article = new Article(); | |
| 90 | $article->image = $this->createImage( | |
| 91 | '/path/to/image', 100, 200, 'image/jpeg' | |
| 92 | ); | |
| 93 | $article = $this->persistAndReloadArticle($article); | |
| 94 | $this->assertInstanceOf(Image::class, $article->image); | |
| 95 | $this->assertEquals(100, $article->image->width); | |
| 96 |         $this->assertEquals('image/jpeg', $article->image->mimetype); | |
| 97 | } | |
| 98 | ||
| 99 | public function testReference() | |
| 100 |     { | |