Fix test failure
This commit is contained in:
parent
ba8663b22a
commit
282022dbd2
@ -1,69 +0,0 @@
|
||||
<?php declare(strict_types=1);
|
||||
/**
|
||||
* Hummingbird Anime List Client
|
||||
*
|
||||
* An API client for Kitsu and MyAnimeList to manage anime and manga watch lists
|
||||
*
|
||||
* PHP version 7
|
||||
*
|
||||
* @package HummingbirdAnimeClient
|
||||
* @author Timothy J. Warren <tim@timshomepage.net>
|
||||
* @copyright 2015 - 2017 Timothy J. Warren
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version 4.0
|
||||
* @link https://github.com/timw4mail/HummingBirdAnimeClient
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JS Folder
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The folder where javascript files exist, in relation to the document root
|
||||
|
|
||||
*/
|
||||
'js_root' => 'js/',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JS Groups
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Config array for javascript files to concatenate and minify
|
||||
|
|
||||
*/
|
||||
'groups' => [
|
||||
'base' => [
|
||||
'base/classList.js',
|
||||
'base/AnimeClient.js',
|
||||
],
|
||||
'event' => [
|
||||
'base/events.js',
|
||||
],
|
||||
'table' => [
|
||||
'base/sort_tables.js',
|
||||
],
|
||||
'table_edit' => [
|
||||
'base/sort_tables.js',
|
||||
'anime_edit.js',
|
||||
'manga_edit.js',
|
||||
],
|
||||
'edit' => [
|
||||
'anime_edit.js',
|
||||
'manga_edit.js',
|
||||
],
|
||||
'anime_collection' => [
|
||||
'anime_search_results.js',
|
||||
'anime_collection.js',
|
||||
],
|
||||
'manga_collection' => [
|
||||
'manga_search_results.js',
|
||||
'manga_collection.js',
|
||||
],
|
||||
]
|
||||
];
|
||||
// End of minify_config.php
|
@ -46,7 +46,8 @@ final class MangaTransformer extends AbstractTransformer {
|
||||
sort($genres);
|
||||
|
||||
$title = $item['canonicalTitle'];
|
||||
$titles = array_unique(array_diff($item['titles'], [$title]));
|
||||
$rawTitles = array_values($item['titles']);
|
||||
$titles = array_unique(array_diff($rawTitles, [$title]));
|
||||
|
||||
return new MangaPage([
|
||||
'id' => $item['id'],
|
||||
|
@ -1,16 +1,18 @@
|
||||
<?php return Aviat\AnimeClient\Types\MangaPage::__set_state(array(
|
||||
'chapter_count' => '-',
|
||||
'cover_image' => 'https://media.kitsu.io/manga/poster_images/20286/small.jpg?1434293999',
|
||||
'en_title' => NULL,
|
||||
'genres' =>
|
||||
array (
|
||||
),
|
||||
'id' => '20286',
|
||||
'jp_title' => 'Bokura wa Minna Kawaisou',
|
||||
'manga_type' => 'manga',
|
||||
'synopsis' => 'Usa, a high-school student aspiring to begin a bachelor lifestyle, moves into a new apartment only to discover that he not only shares a room with a perverted roommate that has an obsession for underaged girls, but also that another girl, Ritsu, a love-at-first-sight, is living in the same building as well!
|
||||
(Source: Kirei Cake)',
|
||||
'title' => 'Bokura wa Minna Kawaisou',
|
||||
'titles' =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
'url' => 'https://kitsu.io/manga/bokura-wa-minna-kawaisou',
|
||||
'volume_count' => '-',
|
||||
));
|
||||
|
@ -51,8 +51,6 @@ class AnimeClientTest extends AnimeClientTestCase
|
||||
|
||||
$toml = arrayToToml($arr);
|
||||
|
||||
echo $toml . "\n";
|
||||
|
||||
$parsedArray = tomlToArray($toml);
|
||||
|
||||
$this->assertEquals($arr, $parsedArray);
|
||||
|
@ -10,7 +10,7 @@
|
||||
"synopsis": "Usa, a high-school student aspiring to begin a bachelor lifestyle, moves into a new apartment only to discover that he not only shares a room with a perverted roommate that has an obsession for underaged girls, but also that another girl, Ritsu, a love-at-first-sight, is living in the same building as well!\n(Source: Kirei Cake)",
|
||||
"coverImageTopOffset": 40,
|
||||
"titles": {
|
||||
"en": null,
|
||||
"en_us": null,
|
||||
"en_jp": "Bokura wa Minna Kawaisou"
|
||||
},
|
||||
"canonicalTitle": "Bokura wa Minna Kawaisou",
|
||||
|
Loading…
Reference in New Issue
Block a user