/** * Tests the isNew method * * @return void */ public function testIsNew() { $data = ['id' => 1, 'title' => 'Foo', 'author_id' => 3]; $request = new Request($data); $this->assertTrue($request->isNew()); $request->isNew(true); $this->assertTrue($request->isNew()); $request->isNew('derpy'); $this->assertTrue($request->isNew()); $request->isNew(false); $this->assertFalse($request->isNew()); }