img = new DrawImage(); } /** * @covers Modules\Draw\Models\DrawImage * @group module */ public function testDefault() : void { self::assertEquals(0, $this->img->id); self::assertNull($this->img->media); } /** * @covers Modules\Draw\Models\DrawImage * @group module */ public function testFromMedia() : void { $img = DrawImage::fromMedia($temp = new Media()); self::assertEquals($temp, $img->media); } /** * @covers Modules\Draw\Models\DrawImage * @group module */ public function testSerialize() : void { self::assertEquals( [ 'id' => 0, 'media' => null, ], $this->img->jsonSerialize() ); } }