Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karlomikus committed Dec 18, 2023
1 parent e34e3e8 commit b454a84
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Scrapers/MakeMeACocktailScraperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ public function testScrape(): void
$scraper = Manager::scrape('https://makemeacocktail.com/cocktail/6781/negroni/');
$result = $scraper->toArray();

$instructions = "1. Add all the ingredients directly into a lowball glass with ice and stir.\n2. Garnish with an orange slice and serve.";
$instructions = "1. Add all the ingredients directly into a lowball glass with ice and stir\n2. Garnish with an orange slice and serve";

$this->assertSame('Negroni', $result['name']);
$this->assertSame('Add all the ingredients directly into a lowball glass with ice and stir. Garnish with an orange slice and serve.', $result['description']);
$this->assertNotEmpty($result['description']);
$this->assertSame('https://makemeacocktail.com/cocktail/6781/negroni/', $result['source']);
$this->assertSame(null, $result['glass']);
$this->assertSame($instructions, $result['instructions']);
$this->assertSame(null, $result['garnish']);
$this->assertSame(['cocktail'], $result['tags']);
$this->assertSame(null, $result['method']);
$this->assertSame('https://makemeacocktail.com/images/cocktails/6781/bitter_negroni.jpg', $result['images'][0]['url']);
$this->assertSame('Make Me A Cocktail', $result['images'][0]['copyright']);
$this->assertNotEmpty($result['images'][0]['url']);
$this->assertSame('Make Me a Cocktail', $result['images'][0]['copyright']);

$this->assertSame(30.0, $result['ingredients'][0]['amount']);
$this->assertSame('ml', $result['ingredients'][0]['units']);
Expand All @@ -39,7 +39,7 @@ public function testScrape(): void

$this->assertSame(30.0, $result['ingredients'][2]['amount']);
$this->assertSame('ml', $result['ingredients'][2]['units']);
$this->assertSame('Sweet Vermouth', $result['ingredients'][2]['name']);
$this->assertSame('Red vermouth', $result['ingredients'][2]['name']);
$this->assertSame(false, $result['ingredients'][2]['optional']);
}
}

0 comments on commit b454a84

Please sign in to comment.