update 1.0.8.0

Commits for version update
This commit is contained in:
Manish Verma
2016-10-17 12:02:27 +05:30
parent dec927987b
commit 76e85db070
9674 changed files with 495757 additions and 58922 deletions

View File

@@ -13,7 +13,6 @@ namespace Symfony\Component\DomCrawler\Tests;
use Symfony\Component\DomCrawler\Form;
use Symfony\Component\DomCrawler\FormFieldRegistry;
use Symfony\Component\DomCrawler\Field;
class FormTest extends \PHPUnit_Framework_TestCase
{
@@ -345,18 +344,6 @@ class FormTest extends \PHPUnit_Framework_TestCase
}
}
public function testSetValueOnMultiValuedFieldsWithMalformedName()
{
$form = $this->createForm('<form><input type="text" name="foo[bar]" value="bar" /><input type="text" name="foo[baz]" value="baz" /><input type="submit" /></form>');
try {
$form['foo[bar'] = 'bar';
$this->fail('->offsetSet() throws an \InvalidArgumentException exception if the name is malformed.');
} catch (\InvalidArgumentException $e) {
$this->assertTrue(true, '->offsetSet() throws an \InvalidArgumentException exception if the name is malformed.');
}
}
public function testDisableValidation()
{
$form = $this->createForm('<form>
@@ -681,31 +668,19 @@ class FormTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($form->has('example.y'), '->has() returns true if the image input was correctly turned into an x and a y fields');
}
/**
* @expectedException \InvalidArgumentException
*/
public function testFormFieldRegistryAddThrowAnExceptionWhenTheNameIsMalformed()
public function testFormFieldRegistryAcceptAnyNames()
{
$registry = new FormFieldRegistry();
$registry->add($this->getFormFieldMock('[foo]'));
}
$field = $this->getFormFieldMock('[t:dbt%3adate;]data_daterange_enddate_value');
/**
* @expectedException \InvalidArgumentException
*/
public function testFormFieldRegistryRemoveThrowAnExceptionWhenTheNameIsMalformed()
{
$registry = new FormFieldRegistry();
$registry->remove('[foo]');
}
$registry->add($field);
$this->assertEquals($field, $registry->get('[t:dbt%3adate;]data_daterange_enddate_value'));
$registry->set('[t:dbt%3adate;]data_daterange_enddate_value', null);
/**
* @expectedException \InvalidArgumentException
*/
public function testFormFieldRegistryGetThrowAnExceptionWhenTheNameIsMalformed()
{
$registry = new FormFieldRegistry();
$registry->get('[foo]');
$form = $this->createForm('<form><input type="text" name="[t:dbt%3adate;]data_daterange_enddate_value" value="bar" /><input type="submit" /></form>');
$form['[t:dbt%3adate;]data_daterange_enddate_value'] = 'bar';
$registry->remove('[t:dbt%3adate;]data_daterange_enddate_value');
}
/**
@@ -717,15 +692,6 @@ class FormTest extends \PHPUnit_Framework_TestCase
$registry->get('foo');
}
/**
* @expectedException \InvalidArgumentException
*/
public function testFormFieldRegistrySetThrowAnExceptionWhenTheNameIsMalformed()
{
$registry = new FormFieldRegistry();
$registry->set('[foo]', null);
}
/**
* @expectedException \InvalidArgumentException
*/