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')); }
/** * Register a view composer to current theme. * * @param string|array $views * @param string|callable $callback * @param int|null $priority * @static */ public static function composer($views, $callback, $priority = null) { return \Pingpong\Themes\Repository::composer($views, $callback, $priority); }
/** * Get theme path. * * @return mixed */ public function getPath() { return $this->path ?: $this->config->get('themes.path'); }