From dd8593a9474d0ffef797dfc24bc594fb82838c9d Mon Sep 17 00:00:00 2001 From: Misha van Tol Date: Wed, 12 Jun 2019 21:23:09 +0200 Subject: [PATCH] Add static factory tests --- tests/FactoryTest.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/FactoryTest.php diff --git a/tests/FactoryTest.php b/tests/FactoryTest.php new file mode 100644 index 0000000..49f9af2 --- /dev/null +++ b/tests/FactoryTest.php @@ -0,0 +1,31 @@ +assertInstanceOf(DataBag::class, $databag); + } + + /** + * @test + */ + public function it_can_be_statically_constructed() + { + $databag = DataBag::fromEntityData('Foo', ['bar' => 'baz']); + $this->assertSame('baz', $databag->get('Foo.bar')); + } +}