public function testGettersAndSetters()
 {
     $authorization = Authorization::create();
     $this->assertEquals(array(), $authorization->getScopes());
     $this->assertEquals(null, $authorization->getCreatedAt());
     $this->assertEquals(null, $authorization->getUpdatedAt());
     $date = new \DateTime();
     $authorization->setScopes(array('some_scope'))->setCreatedAt($date)->setUpdatedAt($date);
     $this->assertEquals(array('some_scope'), $authorization->getScopes());
     $this->assertEquals($date, $authorization->getCreatedAt());
     $this->assertEquals($date, $authorization->getUpdatedAt());
 }
Exemplo n.º 2
0
 /**
  * @param array $data
  *
  * @return Authorization
  */
 protected function createAuthorization(array $data)
 {
     return Authorization::create($data);
 }