Exemple #1
0
 public function update($id, $data)
 {
     /** @var Blog $blog */
     $blog = $this->blogRepo->blogOfId($id);
     $name = new Name($data['name']);
     $url = new URL($data['url']);
     $description = isset($data['description']) ? $data['description'] : null;
     $blog->setName($name);
     $blog->setURL($url);
     $blog->setDescription($description);
     $this->blogRepo->update($blog);
 }
 /**
  * @test
  * @group blogrepo
  */
 public function should_return_null_when_blog_of_id_not_found()
 {
     $id = 9999999999;
     $blog = $this->blogRepo->blogOfId($id);
     $this->assertNull($blog);
 }