Skip to content

Commit

Permalink
Update phar
Browse files Browse the repository at this point in the history
  • Loading branch information
dotzero committed Oct 11, 2017
1 parent 591c77c commit 122bedc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/packager.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
$packager->createPhar(__DIR__ . '/artifacts/amocrm.phar');

$packager->startSection('test-phar');
echo $packager->exec('php ' . __DIR__ . '/test_phar.php');
echo $packager->exec('php ' . __DIR__ . '/test_phar.php') . "\n";
$packager->endSection();
12 changes: 9 additions & 3 deletions build/test_phar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@

$models = [
['account', '\AmoCRM\Models\Account'],
['call', '\AmoCRM\Models\Call'],
['catalog', '\AmoCRM\Models\Catalog'],
['catalog_element', '\AmoCRM\Models\CatalogElement'],
['company', '\AmoCRM\Models\Company'],
['contact', '\AmoCRM\Models\Contact'],
['customer', '\AmoCRM\Models\Customer'],
['customers_periods', '\AmoCRM\Models\CustomersPeriods'],
['custom_field', '\AmoCRM\Models\CustomField'],
['lead', '\AmoCRM\Models\Lead'],
['links', '\AmoCRM\Models\Links'],
['note', '\AmoCRM\Models\Note'],
['task', '\AmoCRM\Models\Task'],
['pipelines', '\AmoCRM\Models\Pipelines'],
['task', '\AmoCRM\Models\Task'],
['transaction', '\AmoCRM\Models\Transaction'],
['unsorted', '\AmoCRM\Models\Unsorted'],
['webhooks', '\AmoCRM\Models\Webhooks'],
['widgets', '\AmoCRM\Models\Widgets'],
['web_hooks', '\AmoCRM\Models\Webhooks'],
];

$amo = new \AmoCRM\Client('example', 'login', 'hash');

foreach ($models as $model) {
echo $amo->{$model[0]} . "\n";
assert($amo->{$model[0]} instanceof $model[1]);
}
}

0 comments on commit 122bedc

Please sign in to comment.