public function test_to_json() { $this->repository = $this->createRepository(); $expected = ['theme1', 'theme2']; $result = $this->repository->toJson(); $this->assertSame($expected, array_column(json_decode($result, true), 'name')); }
/** * Convert all themes to a json string. * * @return string * @static */ public static function toJson() { return \Pingpong\Themes\Repository::toJson(); }