public function testShouldNotCheckRuleWhenInputIsOptional() { $validatable = $this->createMock(Validatable::class); $validatable->expects($this->never())->method('check'); $rule = new Optional($validatable); $this->assertTrue($rule->check('')); }