-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/dev/master'
- Loading branch information
Showing
39 changed files
with
1,671 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...Bundle/DataGridBundle/Tests/Unit/Extension/MassAction/Actions/Ajax/AjaxMassActionTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
|
||
namespace Oro\Bundle\DataGridBundle\Tests\Unit\Extension\MassAction\Actions\Ajax; | ||
|
||
use Oro\Bundle\DataGridBundle\Extension\Action\ActionConfiguration; | ||
use Oro\Bundle\DataGridBundle\Extension\MassAction\Actions\Ajax\AjaxMassAction; | ||
|
||
class AjaxMassActionTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var AjaxMassAction | ||
*/ | ||
protected $action; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function setUp() | ||
{ | ||
$this->action = new AjaxMassAction(); | ||
} | ||
|
||
/** | ||
* @param array $source | ||
* @param array $expected | ||
* @dataProvider setOptionsDataProvider | ||
*/ | ||
public function testSetOptions(array $source, array $expected) | ||
{ | ||
$this->action->setOptions(ActionConfiguration::create($source)); | ||
|
||
$actual = $this->action->getOptions(); | ||
foreach ($expected as $name => $value) { | ||
$this->assertEquals($value, $actual->offsetGet($name)); | ||
} | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function setOptionsDataProvider() | ||
{ | ||
return [ | ||
'confirmation is empty' => [ | ||
'source' => [ | ||
'handler' => 'test.handler', | ||
], | ||
'expected' => [ | ||
'confirmation' => true, | ||
], | ||
], | ||
'confirmation is false' => [ | ||
'source' => [ | ||
'handler' => 'test.handler', | ||
'confirmation' => false, | ||
], | ||
'expected' => [ | ||
'confirmation' => false, | ||
], | ||
], | ||
]; | ||
} | ||
} |
Oops, something went wrong.