@@ 93-103 (lines=11) @@ | ||
90 | $this->assertEquals(new \DateTime('2016-01-01 00:00:00'), $article->date); |
|
91 | } |
|
92 | ||
93 | public function testObject() |
|
94 | { |
|
95 | $article = new Article(); |
|
96 | $article->image = $this->createImage( |
|
97 | '/path/to/image', 100, 200, 'image/jpeg' |
|
98 | ); |
|
99 | $article = $this->persistAndReloadArticle($article); |
|
100 | $this->assertInstanceOf(Image::class, $article->image); |
|
101 | $this->assertEquals(100, $article->image->width); |
|
102 | $this->assertEquals('image/jpeg', $article->image->mimetype); |
|
103 | } |
|
104 | ||
105 | public function testReference() |
|
106 | { |
@@ 159-171 (lines=13) @@ | ||
156 | $this->assertEquals(12.5, $article->double); |
|
157 | } |
|
158 | ||
159 | public function testObject() |
|
160 | { |
|
161 | $this->initGeneralArticle(); |
|
162 | ||
163 | $article = new Article(); |
|
164 | $article->image = $this->createImage( |
|
165 | '/path/to/image', 100, 200, 'image/jpeg' |
|
166 | ); |
|
167 | $article = $this->persistAndReloadArticle($article); |
|
168 | $this->assertInstanceOf(Image::class, $article->image); |
|
169 | $this->assertEquals(100, $article->image->width); |
|
170 | $this->assertEquals('image/jpeg', $article->image->mimetype); |
|
171 | } |
|
172 | ||
173 | public function testObjectCollection() |
|
174 | { |