Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ services:
- elasticsearch
language: php
php:
- '7.1'
- '7.2'
- '7.3'
env:
global:
- COMPOSER_BIN_DIR=~/bin
Expand Down
2 changes: 1 addition & 1 deletion AdobeIms/Test/Unit/Block/Adminhtml/SignInTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class SignInTest extends TestCase
/**
* Prepare test objects.
*/
public function setUp(): void
protected function setUp(): void
{
$this->objectManager = new ObjectManager($this);
$urlBuilderMock = $this->createMock(UrlInterface::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class CallbackTest extends TestCase
/**
* Prepare test objects.
*/
public function setUp(): void
protected function setUp(): void
{
$this->objectManager = new ObjectManager($this);
$this->authMock = $this->createMock(\Magento\Backend\Model\Auth::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class LogoutTest extends TestCase
/**
* @inheritdoc
*/
protected function setUp()
protected function setUp(): void
{
$this->logoutInterfaceMock = $this->createMock(LogOutInterface::class);
$this->context = $this->createMock(\Magento\Backend\App\Action\Context::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ProfileTest extends TestCase
/**
* @inheritdoc
*/
protected function setUp()
protected function setUp(): void
{
$this->action = $this->createMock(\Magento\Backend\App\Action\Context::class);

Expand Down
2 changes: 1 addition & 1 deletion AdobeIms/Test/Unit/Model/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ConfigTest extends TestCase
/**
* Prepare test objects.
*/
public function setUp(): void
protected function setUp(): void
{
$this->objectManager = new ObjectManager($this);
$this->scopeConfigMock = $this->createMock(ScopeConfigInterface::class);
Expand Down
2 changes: 1 addition & 1 deletion AdobeIms/Test/Unit/Model/FlushUserTokensTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class FlushUserTokensTest extends TestCase
/**
* Prepare test objects.
*/
public function setUp(): void
protected function setUp(): void
{
$this->userContext = $this->createMock(UserContextInterface::class);
$this->userProfileRepository = $this->createMock(UserProfileRepositoryInterface::class);
Expand Down
3 changes: 1 addition & 2 deletions AdobeIms/Test/Unit/Model/GetAccessTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace Magento\AdobeIms\Test\Unit\Model;

use Elasticsearch\Endpoints\Get;
use Magento\AdobeIms\Model\GetAccessToken;
use Magento\AdobeImsApi\Api\UserProfileRepositoryInterface;
use Magento\Authorization\Model\UserContextInterface;
Expand Down Expand Up @@ -39,7 +38,7 @@ class GetAccessTokenTest extends TestCase
/**
* Prepare test objects.
*/
public function setUp(): void
protected function setUp(): void
{
$this->userContext = $this->createMock(UserContextInterface::class);
$this->userProfile = $this->createMock(UserProfileRepositoryInterface::class);
Expand Down
2 changes: 1 addition & 1 deletion AdobeIms/Test/Unit/Model/GetImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class GetImageTest extends TestCase
/**
* Prepare test objects.
*/
public function setUp(): void
protected function setUp(): void
{
$this->objectManager = new ObjectManager($this);
$this->configMock = $this->createMock(ScopeConfigInterface::class);
Expand Down
2 changes: 1 addition & 1 deletion AdobeIms/Test/Unit/Model/GetTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class GetTokenTest extends TestCase
/**
* Prepare test objects.
*/
public function setUp(): void
protected function setUp(): void
{
$this->objectManager = new ObjectManager($this);
$this->configMock = $this->createMock(ConfigInterface::class);
Expand Down
2 changes: 1 addition & 1 deletion AdobeIms/Test/Unit/Model/LogOutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,6 @@ public function testExecuteWithException(): void
);
$this->loggerInterfaceMock->expects($this->once())
->method('critical');
$this->assertEquals(false, $this->model->execute());
$this->assertFalse($this->model->execute());
}
}
4 changes: 2 additions & 2 deletions AdobeIms/Test/Unit/Model/UserAuthorizedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class UserAuthorizedTest extends TestCase
/**
* Prepare test objects.
*/
public function setUp(): void
protected function setUp(): void
{
$this->userContext = $this->createMock(UserContextInterface::class);
$this->userProfile = $this->createMock(UserProfileRepositoryInterface::class);
Expand All @@ -62,6 +62,6 @@ public function testExecute(): void
->method('getAccessTokenExpiresAt')
->willReturn(date('Y-m-d H:i:s'));

$this->assertEquals(true, $this->userAuthorized->execute());
$this->assertTrue($this->userAuthorized->execute());
}
}
14 changes: 7 additions & 7 deletions AdobeIms/Test/Unit/Model/UserProfileRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class UserProfileRepositoryTest extends TestCase
/**
* Prepare test objects.
*/
public function setUp(): void
protected function setUp(): void
{
$this->objectManager = new ObjectManager($this);
$this->resource = $this->createMock(ResourceUserProfile::class);
Expand All @@ -65,12 +65,12 @@ public function testSave(): void

/**
* Test save with exception.
*
* @expectedException \Magento\Framework\Exception\CouldNotSaveException
* @expectedExceptionMessage Could not save user profile.
*/
public function testSaveWithException(): void
{
$this->expectException(\Magento\Framework\Exception\CouldNotSaveException::class);
$this->expectExceptionMessage('Could not save user profile.');

$userProfile = $this->createMock(UserProfile::class);
$this->resource->expects($this->once())
->method('save')
Expand All @@ -94,12 +94,12 @@ public function testGet()

/**
* Test get user id with exception.
*
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
* @expectedExceptionMessage The user profile wasn't found.
*/
public function testGeWithException()
{
$this->expectException(\Magento\Framework\Exception\NoSuchEntityException::class);
$this->expectExceptionMessage('The user profile wasn\'t found.');

$entity = $this->objectManager->getObject(UserProfile::class);
$this->entityFactory->method('create')
->willReturn($entity);
Expand Down