forked from supseven-at/mailchimp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Georg Ringer
committed
Jun 6, 2016
1 parent
1865a28
commit efcd6dd
Showing
8 changed files
with
173 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Sup7\Mailchimp\Tests\Unit\Service; | ||
|
||
use Sup7\Mailchimp\Domain\Model\Dto\FormDto; | ||
use Sup7\Mailchimp\Service\ApiService; | ||
use TYPO3\CMS\Core\Tests\UnitTestCase; | ||
|
||
class ApiServiceTest extends UnitTestCase | ||
{ | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function properInterestsAreReturned() | ||
{ | ||
$mockedApiService = $this->getAccessibleMock(ApiService::class, array('dummy'), [], '', false); | ||
$form = new FormDto(); | ||
$interests = [ | ||
'123' => 0, | ||
'456' => true, | ||
'789' => false, | ||
'012' => 1 | ||
]; | ||
$form->setInterests($interests); | ||
$form->setInterest('345'); | ||
$expected = [ | ||
'456' => true, | ||
'012' => true, | ||
'345' => true | ||
]; | ||
$this->assertEquals($expected, $mockedApiService->_call('getInterests', $form)); | ||
} | ||
} |
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