['username' => 'domnikl', 'email' => 'liebler.dominik@gmail.com']]); $mapper = new UserMapper($storage); $user = $mapper->findById(1); $this->assertInstanceOf(User::class, $user); } /** * @expectedException \InvalidArgumentException */ public function testWillNotMapInvalidData() { $storage = new StorageAdapter([]); $mapper = new UserMapper($storage); $mapper->findById(1); } }