/** * Assert that the json attributes do not show up when configured to do so */ public function testEnableHiddenJsonAttributes() { // Mock the model with data $mock = new MockJsonDialectModel(); $mock->setJsonColumns(['testColumn']); $mock->setAttribute('testColumn', json_encode(['foo' => 'bar'])); $mock->showJsonAttributes(false); // Execute the insepect call $mock->inspectJsonColumns(); // Assert that attribute isn't there $this->assertArrayNotHasKey('foo', $mock->toArray()); }