示例#1
0
 protected function getWeekDays()
 {
     return [WeekDay::MONDAY(), WeekDay::WEDNESDAY(), WeekDay::FRIDAY(), WeekDay::TUESDAY(), WeekDay::THURSDAY(), WeekDay::SATURDAY(), WeekDay::SUNDAY()];
 }
示例#2
0
 public function test_that_hash_value_returns_expected_string()
 {
     $this->assertSame('SUNDAY', WeekDay::SUNDAY()->hashValue());
 }
示例#3
0
 protected function getWeekDays()
 {
     return ['Monday' => WeekDay::MONDAY(), 'Wednesday' => WeekDay::WEDNESDAY(), 'Friday' => WeekDay::FRIDAY(), 'Tuesday' => WeekDay::TUESDAY(), 'Thursday' => WeekDay::THURSDAY(), 'Saturday' => WeekDay::SATURDAY(), 'Sunday' => WeekDay::SUNDAY()];
 }
示例#4
0
 public function test_that_clone_includes_linked_nodes()
 {
     $monday = WeekDay::MONDAY();
     $node = new RedBlackNode($monday, 'Monday', 1, RedBlackNode::RED);
     $sunday = WeekDay::SUNDAY();
     $left = new RedBlackNode($sunday, 'Sunday', 1, RedBlackNode::RED);
     $node->setLeft($left);
     $tuesday = WeekDay::TUESDAY();
     $right = new RedBlackNode($tuesday, 'Tuesday', 1, RedBlackNode::RED);
     $node->setRight($right);
     $copy = clone $node;
     $node->setLeft(null);
     $node->setRight(null);
     $this->assertTrue($copy->left()->key()->equals($sunday));
 }