import axiom without dependency on symfony console
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit

This commit is contained in:
2020-06-21 07:36:31 -04:00
parent 348d17cdd3
commit fb619dccbf
27 changed files with 2608 additions and 829 deletions

View File

@@ -0,0 +1,34 @@
<?php
use Enzyme\Axiom\Bags\ArrayBag;
class ArrayBagTest extends PHPUnit_Framework_TestCase
{
public function test_bag_stores_value_as_expected()
{
$expected = 'Bar';
$bag = new ArrayBag(['foo' => $expected]);
$this->assertEquals($expected, $bag->get('foo'));
}
public function test_bag_returns_null_for_unknown_key()
{
$expected = null;
$bag = new ArrayBag(['foo' => 'bar']);
$this->assertEquals($expected, $bag->get('PHP'));
}
public function test_bag_stores_values_as_expected()
{
$expected = ['foo' => 'Bar', 'PHP' => 'Rulez'];
$bag = new ArrayBag($expected);
$this->assertEquals($expected, $bag->getAll());
}
public function test_bag_reports_stored_value_as_expected()
{
$expected = true;
$bag = new ArrayBag(['foo' => 'bar']);
$this->assertEquals($expected, $bag->has('foo'));
}
}