Skip to content

Commit

Permalink
Update Programme:
Browse files Browse the repository at this point in the history
- add new attribute
  • Loading branch information
webeweb committed Jul 27, 2019
1 parent c36b647 commit 8b5a582
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/Model/Programme.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ class Programme extends AbstractModel {
*/
private $length;

/**
* New.
*
* @var bool
*/
private $new;

/**
* PDC start.
*
Expand Down Expand Up @@ -226,6 +233,15 @@ public function getLength() {
return $this->length;
}

/**
* Get the new.
*
* @return bool Returns the new.
*/
public function getNew() {
return $this->new;
}

/**
* Get the PDC start.
*
Expand Down Expand Up @@ -373,6 +389,17 @@ public function setLength(Length $length = null) {
return $this;
}

/**
* Set the new.
*
* @param bool $new The new.
* @return Programme Returns this programme.
*/
public function setNew($new) {
$this->new = $new;
return $this;
}

/**
* Set the PDC start.
*
Expand Down
14 changes: 14 additions & 0 deletions tests/Model/ProgrammeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function testConstruct() {
$this->assertNull($obj->getLanguage());
$this->assertNull($obj->getLastChance());
$this->assertNull($obj->getLength());
$this->assertNull($obj->getNew());
$this->assertNull($obj->getPremiere());
$this->assertNull($obj->getPreviouslyShown());
$this->assertNull($obj->getPdcStart());
Expand Down Expand Up @@ -163,6 +164,19 @@ public function testSetLength() {
$this->assertSame($length, $obj->getLength());
}

/**
* Tests the setNew() method.
*
* @return void
*/
public function testSetNew() {

$obj = new Programme();

$obj->setNew(false);
$this->assertFalse($obj->getNew());
}

/**
* Tests the setPdcStart() method.
*
Expand Down

0 comments on commit 8b5a582

Please sign in to comment.