X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2FCatalog.phpt;h=2901da7cdc71f8f81c9902df2b946d80a8d4508e;hb=828a6547cc621fec6fd81745a8f6c9753f904bf2;hp=1ee713fd5b459a23ad1c335f9288ac3ef1bf1810;hpb=0272ce4a9b54b22f3f39e3b8dd2043ade3f3b697;p=awesomized%2Fext-ion diff --git a/tests/Catalog.phpt b/tests/Catalog.phpt index 1ee713f..2901da7 100644 --- a/tests/Catalog.phpt +++ b/tests/Catalog.phpt @@ -8,7 +8,7 @@ TEST $c = new ion\Catalog; var_dump(count($c)); -$c->add(ion\Symbol\Table\PHP()); +$c->add($php = ion\Symbol\PHP::asTable()); var_dump(count($c)); $c->add(new ion\Symbol\Table\Shared("shared", 1, ["foo", "bar", "baz"])); var_dump(count($c)); @@ -23,7 +23,14 @@ var_dump($c->findBest("shared")); $c->remove("shared"); var_dump(count($c)); -var_dump(clone $c); +var_dump($d = clone $c); +$c->remove($php); +$c->remove($php); +unset($c); +var_dump(count($d)); +var_dump($d->find("PHP", 1)); +$d->remove($php); +var_dump(count($d)); ?> DONE --EXPECTF-- @@ -121,4 +128,15 @@ object(ion\Catalog)#%d (1) { array(0) { } } +int(1) +object(ion\Symbol\Table\Shared)#%d (3) { + ["name"]=> + string(3) "PHP" + ["version"]=> + int(1) + ["symbols":"ion\Symbol\Table\Shared":private]=> + array(0) { + } +} +int(0) DONE