assertSame([], $dbo->getArray()); } public function testArrayString() { $dbo = LuStringDboArray::jsonDeserialize(["42"]); $this->assertSame(["42"], $dbo->getArray()); } public function testArrayMultipleString() { $dbo = LuStringDboArray::jsonDeserialize(["42", "24", "48"]); $this->assertSame(["42", "24", "48"], $dbo->getArray()); } public function testArrayInt() { $dbo = LuStringDboArray::jsonDeserialize([42]); $this->assertSame(["42"], $dbo->getArray()); } public function testArrayMultipleInt() { $dbo = LuStringDboArray::jsonDeserialize([42, 24, 48]); $this->assertSame(["42", "24", "48"], $dbo->getArray()); } public function testArrayStringIntPlusData() { $dbo = LuStringDboArray::jsonDeserialize(["42test"]); $this->assertSame(["42test"], $dbo->getArray()); } public function testArrayMultipleStringIntPlusData() { $dbo = LuStringDboArray::jsonDeserialize(["42", 42, "42test"]); $this->assertSame(["42", "42", "42test"], $dbo->getArray()); } public function testArrayFloat() { $dbo = LuStringDboArray::jsonDeserialize([42.42]); $this->assertSame(["42.42"], $dbo->getArray()); } public function testArrayMultipleTypes() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize(["42", 42, "42test", null]); } public function testIntString() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize("42"); } public function testInt() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize(42); } public function testIntNegativeString() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize("-42"); } public function testIntNegative() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize(-42); } public function testFloat() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize(42.42); } public function testFloatString() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize("42.42"); } public function testExponentialString() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize("42e+01"); } public function testBool() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize(true); } public function testBoolString() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize("true"); } public function testNull() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize(null); } public function testObject() { $this->expectException(LuDboDeserializeException::class); LuStringDboArray::jsonDeserialize(new self()); } }