mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 23:59:51 +01:00
Fix some coding standards
This commit is contained in:
parent
124ac05e02
commit
b8c76e3054
323 changed files with 860 additions and 670 deletions
|
|
@ -1,11 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
use Respect\Validation\Validator as v;
|
||||
|
||||
/**
|
||||
* Class PrivateAbstractNestedException
|
||||
* @package Respect\Validation\Exceptions
|
||||
* phpunit has an issue with mocking exceptions when in HHVM:
|
||||
* https://github.com/sebastianbergmann/phpunit-mock-objects/issues/207
|
||||
*/
|
||||
|
|
@ -24,8 +23,8 @@ class AbstractNestedExceptionTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testGetRelatedShouldReturnExceptionAddedByAddRelated()
|
||||
{
|
||||
$composite = new AttributeException;
|
||||
$node = new IntException;
|
||||
$composite = new AttributeException();
|
||||
$node = new IntException();
|
||||
$composite->addRelated($node);
|
||||
$this->assertEquals(1, count($composite->getRelated(true)));
|
||||
$this->assertContainsOnly($node, $composite->getRelated());
|
||||
|
|
@ -33,8 +32,8 @@ class AbstractNestedExceptionTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testAddingTheSameInstanceShouldAddJustASingleReference()
|
||||
{
|
||||
$composite = new AttributeException;
|
||||
$node = new IntException;
|
||||
$composite = new AttributeException();
|
||||
$node = new IntException();
|
||||
$composite->addRelated($node);
|
||||
$composite->addRelated($node);
|
||||
$composite->addRelated($node);
|
||||
|
|
@ -44,10 +43,10 @@ class AbstractNestedExceptionTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testFindRelatedShouldFindCompositeExceptions()
|
||||
{
|
||||
$foo = new AttributeException;
|
||||
$bar = new AttributeException;
|
||||
$baz = new AttributeException;
|
||||
$bat = new AttributeException;
|
||||
$foo = new AttributeException();
|
||||
$bar = new AttributeException();
|
||||
$baz = new AttributeException();
|
||||
$bat = new AttributeException();
|
||||
$foo->configure('foo');
|
||||
$bar->configure('bar');
|
||||
$baz->configure('baz');
|
||||
|
|
@ -135,7 +134,7 @@ class AbstractNestedExceptionTest extends \PHPUnit_Framework_TestCase
|
|||
$messages = $e->findMessages(
|
||||
array(
|
||||
'allOf' => 'Invalid {{name}}',
|
||||
'first_name.length' => 'Invalid length for {{name}} {{input}}'
|
||||
'first_name.length' => 'Invalid length for {{name}} {{input}}',
|
||||
)
|
||||
);
|
||||
$this->assertEquals($messages['allOf'], 'Invalid Validation Form');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue