/** * @param $reason */ protected function throw_exception($reason) { $this->reason = ucfirst(strtolower($this->check->is_or_failing() ? $this->reason . ' or ' . $reason : $reason)); // $this->reason = ucfirst( strtolower( $this->reason ? $this->reason . ' or ' . $reason : $reason ) ); $this->has_thrown = true; throw new $this->excpeption($this->reason); }
/** * @covers tad_Arg_Check::or_condition * @covers tad_Arg_Check_FailingState::or_condition * @uses tad_Arg_Check::is_or_failing */ public function testCanApplyOrCondition() { $this->tad_arg_check->or_condition(); $this->assertTrue($this->tad_arg_check->is_or_failing()); }
/** * @covers tad_Arg_Check::is_or_failing */ public function testIsNot_or_failing() { $this->assertFalse($this->tad_arg_check->is_or_failing()); }