public function testValidationFailsOnEmptyHolderName() { $this->account->setHolderName(''); $this->assertSame('', $this->account->getHolderName()); $violations = Validator::validateBankAccount($this->account, null); $this->assertTrue(count($violations) === 1); $this->assertTrue(count($violations->get('holderName')) === 1); $this->account->setHolderName(null); $this->assertSame(null, $this->account->getHolderName()); $violations = Validator::validateBankAccount($this->account, null); $this->assertTrue(count($violations) === 1); $this->assertTrue(count($violations->get('holderName')) === 1); }