Skip to content
Open
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: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
vendor/
tests/_output
composer.lock
tests/_support/*
tests/_support/_generated/*
15 changes: 8 additions & 7 deletions codeception.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
namespace: Tests\Fei\Entities

actor: Tester

paths:
tests: tests
log: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs

settings:
colors: true
memory_limit: 1024M

extensions:
enabled:
- Codeception\Extension\RunFailed
modules:
config:
Db:
dsn: ''
user: ''
password: ''
dump: tests/_data/dump.sql

bootstrap: bootstrap.php

coverage:
enabled: true
remote: false
Expand Down
14 changes: 11 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,28 @@
],
"require": {
"php" : "^7.0",
"zendframework/zend-filter": "^2.7",
"objective-php/gateway": "^1.0.0"
"zendframework/zend-filter": "^2.7"
},
"require-dev": {
"zendframework/zend-eventmanager": "^3.2",
"zendframework/zend-servicemanager": "^3.3",
"zendframework/zend-hydrator": "^2.2",
"league/fractal": "^0.13.0",
"squizlabs/php_codesniffer": "3.*",
"codeception/codeception": "^2.4"
"codeception/codeception": "^4.1"
},
"autoload": {
"files": [
"objective-php-polyfill.php"
],
"psr-4": {
"Fei\\Entities\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\Fei\\Entities\\": "tests/_support",
"Tests\\Fei\\Entities\\Hydrator\\": "tests/unit/Hydrator"
}
}
}
9 changes: 9 additions & 0 deletions objective-php-polyfill.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

if (!interface_exists('ObjectivePHP\Gateway\Entity\EntityInterface')) {
class_alias('Fei\Entities\ObjectivePHP\Gateway\Entity\EntityInterface', 'ObjectivePHP\Gateway\Entity\EntityInterface');
}

if (!interface_exists('ObjectivePHP\Gateway\Hydrator\DenormalizedDataExtractorInterface')) {
class_alias('Fei\Entities\ObjectivePHP\Gateway\Hydrator\DenormalizedDataExtractorInterface', 'ObjectivePHP\Gateway\Hydrator\DenormalizedDataExtractorInterface');
}
16 changes: 16 additions & 0 deletions src/ObjectivePHP/Gateway/Entity/EntityInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Fei\Entities\ObjectivePHP\Gateway\Entity;

interface EntityInterface extends \ArrayAccess
{
const DEFAULT_ENTITY_COLLECTION = 'NONE';

public function getEntityCollection() : string;

public function getEntityIdentifier() : string;

public function isNew() : bool;

public function getEntityFields() : array;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Fei\Entities\ObjectivePHP\Gateway\Hydrator;

interface DenormalizedDataExtractorInterface
{
public function extractDenormalized($entity);

public function denormalizeData(array $data): array;
}
2 changes: 0 additions & 2 deletions tests/_bootstrap.php

This file was deleted.

1 change: 0 additions & 1 deletion tests/_data/dump.sql

This file was deleted.

26 changes: 0 additions & 26 deletions tests/_support/AcceptanceTester.php

This file was deleted.

26 changes: 0 additions & 26 deletions tests/_support/FunctionalTester.php

This file was deleted.

10 changes: 0 additions & 10 deletions tests/_support/Helper/Acceptance.php

This file was deleted.

10 changes: 0 additions & 10 deletions tests/_support/Helper/Functional.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/_support/Helper/Unit.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Helper;
namespace Tests\Fei\Entities\Helper;

// here you can define custom actions
// all public methods declared in helper class will be available in $I
Expand Down
2 changes: 1 addition & 1 deletion tests/_support/UnitTester.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

namespace Tests\Fei\Entities;

/**
* Inherited Methods
Expand Down
18 changes: 0 additions & 18 deletions tests/_support/_generated/AcceptanceTesterActions.php

This file was deleted.

18 changes: 0 additions & 18 deletions tests/_support/_generated/FunctionalTesterActions.php

This file was deleted.

Loading