public function test_delete() { $input = ['name' => ['first' => 'Brad', 'last' => 'Bell'], 'spouse' => ['name' => ['first' => 'Brandon', 'last' => 'Kelly'], 'mood' => 'Happy', 'age' => '75'], 'mood' => 'Angry', 'age' => 25]; $expect = ['name' => ['first' => 'Brad', 'last' => 'Bell'], 'spouse' => ['name' => ['first' => 'Brandon', 'last' => 'Kelly'], 'age' => '75'], 'mood' => 'Angry', 'age' => 25]; $actual = $input; Dot::delete($actual, 'spouse.mood'); $this->assertNotEquals($input, $actual); $this->assertEquals($expect, $actual); }
/** * @param string $name * @param null|mixed $default * * @return null|Cookie */ public function get($name, $default = null) { return Dot::get($this->cookies, $name, $default); }
/** * @return null|string */ protected function getDefaultDomain() { return Dot::get($_SERVER, 'SERVER_NAME'); }