Пример #1
0
 /**
  * @covers ::isPending
  * @covers ::setState
  */
 public function testIsPending()
 {
     $model = new City(null, State::VOID);
     $this->assertFalse($model->isPending());
     $model->setState(State::PENDING);
     $this->assertTrue($model->isPending());
 }
Пример #2
0
 /**
  * @covers ::__construct
  */
 public function testConstruct()
 {
     $city = new City();
     $this->assertTrue($city->isPending());
     $city = new City([], State::DELETED);
     $this->assertTrue($city->isDeleted());
     $city = new City(['name' => 'test', 'id' => 3]);
     $this->assertEquals('test', $city->name);
     $this->assertEquals(3, $city->id);
 }