Skip to content

Commit

Permalink
Because of compatibility with PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mlantz committed Dec 15, 2020
1 parent db28e1a commit ae15b9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"require-dev": {
"illuminate/database": "^6.0|^7.0|^8.0",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~7.1"
"phpunit/phpunit": "~8.5"
},
"autoload": {
"psr-4": {
Expand Down
16 changes: 8 additions & 8 deletions tests/FormBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,20 +669,20 @@ public function testFormSelectYear()
$select2 = (string) $this->formBuilder->selectYear('year', 2000, 2020, null, ['id' => 'foo']);
$select3 = (string) $this->formBuilder->selectYear('year', 2000, 2020, '2000');

$this->assertContains('<select name="year"><option value="2000">2000</option><option value="2001">2001</option>',
$this->assertStringContainsString('<select name="year"><option value="2000">2000</option><option value="2001">2001</option>',
$select1);
$this->assertContains('<select id="foo" name="year"><option value="2000">2000</option><option value="2001">2001</option>',
$this->assertStringContainsString('<select id="foo" name="year"><option value="2000">2000</option><option value="2001">2001</option>',
$select2);
$this->assertContains('<select name="year"><option value="2000" selected="selected">2000</option><option value="2001">2001</option>',
$this->assertStringContainsString('<select name="year"><option value="2000" selected="selected">2000</option><option value="2001">2001</option>',
$select3);
}

public function testFormSelectRange()
{
$range = (string) $this->formBuilder->selectRange('dob', 1900, 2013);

$this->assertContains('<select name="dob"><option value="1900">1900</option>', $range);
$this->assertContains('<option value="2013">2013</option>', $range);
$this->assertStringContainsString('<select name="dob"><option value="1900">1900</option>', $range);
$this->assertStringContainsString('<option value="2013">2013</option>', $range);
}

public function testFormSelectMonth()
Expand All @@ -691,10 +691,10 @@ public function testFormSelectMonth()
$month2 = (string) $this->formBuilder->selectMonth('month', '1');
$month3 = (string) $this->formBuilder->selectMonth('month', null, ['id' => 'foo']);

$this->assertContains('<select name="month"><option value="1">January</option><option value="2">February</option>',
$this->assertStringContainsString('<select name="month"><option value="1">January</option><option value="2">February</option>',
$month1);
$this->assertContains('<select name="month"><option value="1" selected="selected">January</option>', $month2);
$this->assertContains('<select id="foo" name="month"><option value="1">January</option>', $month3);
$this->assertStringContainsString('<select name="month"><option value="1" selected="selected">January</option>', $month2);
$this->assertStringContainsString('<select id="foo" name="month"><option value="1">January</option>', $month3);
}

public function testFormCheckbox()
Expand Down

0 comments on commit ae15b9c

Please sign in to comment.