public function test_scrape_a_recipe_with_ingredient_groups()
 {
     $recipe = new Recipe();
     $recipe->setAuthor('Hungry Happenings');
     $recipe->setDescription('Want an over-the-top way to make peach cobbler that won’t take you all day to decorate? This four-layer, cinnamon-infused yellow cake topped with cheesecake filling, caramelized peaches and brown sugar cake crumbles couldn’t be more amazing.');
     $recipe->setImage('http://images-gmi-pmc.edge-generalmills.com/0374ccd2-63a9-4380-a86d-0f4acb02d607.jpg');
     $recipe->setName('Naked Peach Cobbler Cake');
     $recipe->setRecipeIngredients([['title' => 'Cake Layers', 'data' => ['1 box Betty Crocker™ SuperMoist™ cake mix yellow', '1 cup water', '1/2 cup oil', '3 large eggs', '1 teaspoon cinnamon']], ['title' => 'Glazed Peaches', 'data' => ['10 tablespoons butter', '1/2 cup brown sugar', '1/2 cup granulated sugar', '10 peaches, peeled and sliced', '1 teaspoon cinnamon', '1/4 teaspoon nutmeg']], ['title' => 'Cheesecake Layers', 'data' => ['2 8-ounce blocks of cream cheese, softened', '1/4 cup granulated sugar', '7 ounces marshmallow fluff', '8 ounces frozen whipped topping, thawed']], ['title' => 'Brown Sugar Cake Crumbles', 'data' => ['1/3 cup brown sugar', '3/4 cup cake crumbs (from cake layers above)', '1/2 teaspoon cinnamon', '2 tablespoons butter, melted']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['CAKE LAYERS: Preheat oven to 350 °F. Spray two 8-inch round cake pans with baking spray, then line bottoms of pans with rounds of parchment paper. Make cake mix according to package instructions. Stir in the cinnamon and equally divide batter between cake pans. Bake for 28-34 minutes until a toothpick inserted in the center comes out clean. Remove from oven and let cool in pan for 10 minutes, then un-mold onto a cooling rack and allow to cool completely.', 'GLAZED PEACHES: Heat butter in a skillet set over medium-high heat. Once melted, stir in both sugars and allow to dissolve. Toss in peach slices, cinnamon and nutmeg. Bring to a boil, then reduce heat to medium-low and cook until peaches are tender, 10-16 minutes. Remove from heat and allow to cool completely.', 'CHEESECAKE FILLING: Beat cream cheese using an electric mixer or food processor until light and fluffy. Add sugar and marshmallow fluff and beat until well incorporated. Beat in whipped topping just until combined.', 'BROWN SUGAR CAKE CRUMBLES: Preheat oven to 350 °F. Cut off the domed portion of each cake and crumble the tops into very small pieces. Measure out 3/4 cup crumbs and mix with brown sugar, cinnamon and melted butter. Spread out into a thin layer on a baking sheet. Bake for 10 minutes, then remove and stir. Bake an additional 6-10 minutes until fragrant and deep golden brown. Remove and allow to cool completely.', 'To assemble cake: Cut each cake into 2 even layers. Set one layer on a cake plate. Spread 1/4th of the cheesecake filling over top. Spoon 1/4 of the glazed peaches on top. Sprinkle on 1/4 of the brown sugar cake crumbles over the peaches. Repeat this process, adding the remaining 3 cake layers and topping them with cheesecake filling, peaches, and cake crumbles. Refrigerate until ready to serve. Will keep in the refrigerator up to 5 days.']]]);
     $recipe->setRecipeYield('12');
     $recipe->setTotalTime(new DateInterval('PT3H'));
     $recipe->setUrl('http://www.tablespoon.com/recipes/naked-peach-cobbler-cake/5155d33e-558b-4414-964c-a23518caded7');
     $crawler = $this->client->request('GET', 'http://www.tablespoon.com/recipes/naked-peach-cobbler-cake/5155d33e-558b-4414-964c-a23518caded7');
     $scraper = new TablespoonCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
 public function test_scrape_another_recipe_with_ingredient_groups()
 {
     $recipe = new Recipe();
     $recipe->setDescription('Enjoy this yummy red colored cake layered with frosting--a delicious dessert treat.');
     $recipe->setImage('http://images-gmi-pmc.edge-generalmills.com/00f6aa66-61c7-4245-b020-af313d1ad08a.jpg');
     $recipe->setName('Quick Red Velvet Cake');
     $recipe->setPrepTime(new DateInterval('PT40M'));
     $recipe->setRecipeIngredients([['title' => 'Cake', 'data' => ['1 box chocolate cake mix', '1 cup water', '1/2 cup sour cream', '1/4 cup vegetable oil', '3 eggs', '2 tablespoons unsweetened baking cocoa', '1 bottle (1 oz) red food color']], ['title' => 'Frosting', 'data' => ['1/2 cup all-purpose flour', '1 1/2 cups milk', '1 1/2 cups sugar', '1 1/2 cups butter or margarine, softened', '1 tablespoon vanilla']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['Heat oven to 350 °F (325 °F for dark or nonstick pans). Grease and flour two 9-inch cake pans, or spray with baking spray with flour. In large bowl, beat cake ingredients with electric mixer on low speed 30 seconds, then on medium speed 2 minutes, scraping bowl occasionally. Pour batter into pans.', 'Bake 31 to 36 minutes or until toothpick inserted in center comes out clean. Cool 10 minutes; remove from pans to cooling rack. Cool completely.', 'Meanwhile, in 2-quart saucepan, cook flour and milk over medium heat, stirring constantly, until mixture is very thick. Cover surface with plastic wrap; cool to room temperature.', 'In large bowl, beat sugar and butter with electric mixer on high speed until light and fluffy. Gradually add flour mixture by tablespoonfuls, beating until smooth. Beat in vanilla.', 'Place 1 cake layer, top side down, on serving plate; spread with 1 cup frosting. Top with second layer, top side up. Frost side and top of cake with frosting. Store in refrigerator.']]]);
     $recipe->setRecipeYield('16');
     $recipe->setTotalTime(new DateInterval('PT2H45M'));
     $recipe->setUrl('https://www.pillsbury.com/recipes/quick-red-velvet-cake/d6859094-96b1-4ef9-b1ac-c21990234b82');
     $crawler = $this->client->request('GET', 'https://www.pillsbury.com/recipes/quick-red-velvet-cake/d6859094-96b1-4ef9-b1ac-c21990234b82');
     $scraper = new PillsburyCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
 public function test_scrape_another_recipe_with_ingredient_groups()
 {
     $recipe = new Recipe();
     $recipe->setCookTime(new DateInterval('PT30M'));
     $recipe->setImage('http://cdn1.tmbi.com/TOH/Images/Photos/37/300x300/exps37457_THCA1693311D146.jpg');
     $recipe->setName('Chocolate Mallow Cake Recipe');
     $recipe->setPrepTime(new DateInterval('PT60M'));
     $recipe->setRecipeIngredients([['title' => '', 'data' => ['1/3 cup shortening', '1 cup sugar', '1/2 cup packed brown sugar', '2 large eggs', '2 ounces unsweetened chocolate, melted and cooled', '1 teaspoon vanilla extract', '1 cup buttermilk', '1/4 cup water', '1-3/4 cups cake flour', '1-1/2 teaspoons baking soda', '3/4 teaspoon salt']], ['title' => 'Filling', 'data' => ['1 cup packed brown sugar', '3 tablespoons all-purpose flour', '1 cup milk', '2 large egg yolks, beaten', '2 tablespoons butter', '1 teaspoon vanilla extract', '1/2 cup chopped pecans']], ['title' => 'Frosting', 'data' => ['1-1/2 cups sugar', '2 large egg whites', '1/3 cup water', '1 tablespoon light corn syrup', '1/4 teaspoon cream of tartar', '2 cups miniature marshmallows', '1 ounce unsweetened chocolate, melted']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['In a large bowl, cream shortening and sugars. Add eggs, one at a time, beating well after each. Beat in chocolate and vanilla. Combine buttermilk and water. Combine the cake flour, baking soda and salt; add to creamed mixture alternately with buttermilk mixture.', 'Pour into a greased and floured 13-in. x 9-in. baking pan. Bake at 350 ° for 30-35 minutes or until a toothpick inserted near the center comes out clean. Cool for 10 minutes before removing from pan to a wire rack.', 'For filling, in a small saucepan, combine brown sugar and all-purpose flour. Stir in milk until smooth. Cook and stir over medium-high heat until thickened and bubbly. Reduce heat; cook and stir 2 minutes longer. Remove from the heat. Stir a small amount of hot filling into egg yolks; return all to pan, stirring constantly. Bring to a gentle boil; cook and stir 2 minutes longer.', 'Remove from the heat. Gently stir in butter and vanilla. Cool to room temperature without stirring. Spread over cake to within 1/2 in. of edges; sprinkle with pecans. Refrigerate for 30 minutes or until set.', 'For frosting, in a heavy saucepan over low heat, combine the sugar, egg whites, water, corn syrup and cream of tartar. With a portable mixer, beat on low speed for 1 minute. Continue beating on low over low heat for 8-10 minutes or until frosting reaches 160 °.', 'Pour into the large bowl of a heavy-duty stand mixer; add marshmallows. Beat on high for 7-9 minutes or until stiff peaks form. Carefully spread over cake. Pipe thin lines of melted chocolate over cake; gently pull a toothpick or sharp knife through lines in alternating directions. Store in the refrigerator.']]]);
     $recipe->setRecipeYield('15');
     $recipe->setTotalTime(new DateInterval('PT90M'));
     $recipe->setUrl('http://www.tasteofhome.com/recipes/chocolate-mallow-cake');
     $crawler = $this->client->request('GET', 'http://www.tasteofhome.com/recipes/chocolate-mallow-cake');
     $scraper = new TasteOfHomeCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
 public function test_scrape_another_recipe_with_ingredient_groups()
 {
     $recipe = new Recipe();
     $recipe->setDescription('You\'ll fall in love with these pumpkin bars! They have a light texture, are full of cinnamon, ginger, raisins and nuts and are topped with cream cheese frosting.');
     $recipe->setImage('http://images-gmi-pmc.edge-generalmills.com/d1d62d2c-5cd2-42e2-811f-902aa914464a.jpg');
     $recipe->setName('Harvest Pumpkin-Spice Bars');
     $recipe->setPrepTime(new DateInterval('PT15M'));
     $recipe->setRecipeIngredients([['title' => 'Bars', 'data' => ['4 eggs', '2 cups granulated sugar', '1 cup vegetable oil', '1 can (15 oz) pumpkin (not pumpkin pie mix)', '2 cups Gold Medal™ all-purpose flour', '2 teaspoons baking powder', '2 teaspoons ground cinnamon', '1 teaspoon baking soda', '1/2 teaspoon salt', '1/2 teaspoon ground ginger', '1/4 teaspoon ground cloves', '1 cup raisins, if desired']], ['title' => 'Cream Cheese Frosting', 'data' => ['1 package (3 oz) cream cheese, softened', '1/3 cup butter or margarine, softened', '1 teaspoon vanilla', '2 cups powdered sugar', '1/2 cup chopped walnuts, if desired']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['Heat oven to 350 °F. Lightly grease bottom and sides of 15x10x1-inch pan with shortening. In large bowl, beat eggs, granulated sugar, oil and pumpkin until smooth. Stir in flour, baking powder, cinnamon, baking soda, salt, ginger and cloves. Stir in raisins. Spread in pan.', 'Bake 25 to 30 minutes or until light brown. Cool completely in pan on cooling rack, about 2 hours.', 'In medium bowl, beat cream cheese, butter and vanilla with electric mixer on low speed until smooth. Gradually beat in powdered sugar, 1 cup at a time, on low speed until smooth and spreadable. Spread frosting over bars. Sprinkle with walnuts. For bars, cut into 7 rows by 7 rows. Store in refrigerator.']]]);
     $recipe->setRecipeYield('49');
     $recipe->setTotalTime(new DateInterval('PT1H40M'));
     $recipe->setUrl('http://www.bettycrocker.com/recipes/harvest-pumpkin-spice-bars/0ca6cc1d-4afd-452e-af7e-b931cfcb159a');
     $crawler = $this->client->request('GET', 'http://www.bettycrocker.com/recipes/harvest-pumpkin-spice-bars/0ca6cc1d-4afd-452e-af7e-b931cfcb159a');
     $scraper = new BettyCrockerCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
 public function test_scrape_another_recipe_with_instruction_groups()
 {
     $recipe = new Recipe();
     $recipe->setCookTime(new DateInterval('PT50M'));
     $recipe->setDescription('A sweet and delicious baked french toast casserole with a praline topping.');
     $recipe->setImage('http://static.pauladeen.com/media/catalog/product/cache/1/small_image/9df78eab33525d08d6e5fb8d27136e95/b/a/baked_french_toast_casserole_1.jpg');
     $recipe->setName('Baked French Toast Casserole');
     $recipe->setPrepTime(new DateInterval('PT10M'));
     $recipe->setRecipeIngredients([['title' => '', 'data' => ['dash salt', '1 teaspoon ground nutmeg, divided', '1 teaspoon ground cinnamon, divided', '1 tablespoon vanilla extract', '2 tablespoons sugar', '1 cup milk', '8 large eggs', '2 cups half and half', '1 loaf French bread, (13 to 16 oz)', '1/2 lb butter, plus more for pan', '1 cup light brown sugar, packed', '1 cup chopped pecans', '2 tablespoons light corn syrup', '1 cup raspberry preserves', '3 tablespoons water', '2 tablespoons raspberry liqueur']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['Slice French bread into 20 slices, 1-inch thick each. (Use any extra bread for garlic toast or bread crumbs). Arrange slices in a generously buttered 9X13 casserole dish in 2 rows, overlapping the slices.', 'In a large bowl, combine the eggs, half and half, milk, sugar, vanilla, 1/2 teaspoon cinnamon, 1/2 teaspoon nutmeg and salt and beat with a rotary beater or whisk until blended but not too bubbly. Pour mixture over the bread slices, making sure all are covered evenly with the milk-egg mixture. Spoon some of the mixture in between the slices. Cover with foil and refrigerate overnight.', 'The next day, preheat oven to 350 °. Spread Praline Topping evenly over the bread and bake for 45 minutes, until puffed and lightly golden. Serve with Raspberry Syrup.']], ['title' => 'Praline Topping', 'data' => ['Combine butter, brown sugar, pecans, light corn syrup, 1/2 teaspoon cinnamon and 1/2 teaspoon nutmeg in a medium bowl and blend well. Spread over bread as directed above.']], ['title' => 'Raspberry Syrup', 'data' => ['Combine raspberry preserves, water and liqueur in a small saucepan and place over medium heat. Stir until warm and thinned out like syrup.']]]);
     $recipe->setTotalTime(new DateInterval('PT60M'));
     $recipe->setUrl('http://www.pauladeen.com/baked-french-toast-casserole/');
     $crawler = $this->client->request('GET', 'http://www.pauladeen.com/baked-french-toast-casserole/');
     $scraper = new PaulaDeenCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
 public function test_scrape_another_recipe_with_ingredient_groups()
 {
     $recipe = new Recipe();
     $recipe->setCookTime(new DateInterval('PT35M'));
     $recipe->setImage('http://cook.sndimg.com/content/dam/images/cook/fullset/2012/8/20/0/CCUQS206_Peanut-Butter-Pie-Fudge_s4x3.jpg/jcr:content/renditions/cq5dam.web.266.200.jpeg');
     $recipe->setName('Peanut Butter Pie Fudge');
     $recipe->setPrepTime(new DateInterval('PT45M'));
     $recipe->setRecipeIngredients([['title' => 'Pie Crust', 'data' => ['20 cream-filled chocolate sandwich cookies', '1 tablespoon butter, melted']], ['title' => 'Peanut Butter Fudge', 'data' => ['1 1/2 cups confectioners\' sugar', '1/2 stick butter', '1 cup brown sugar', '1/2 cup whipping cream (30-percent fat)', '1/2 teaspoon salt', '1/2 cup peanut butter', '1/2 teaspoon vanilla extract']], ['title' => 'Caramel', 'data' => ['1/2 cup heavy cream (36-to38-percent fat)', '1/2 cup brown sugar', '1/2 cup granulated sugar', '1/4 cup corn syrup', '1/4 cup whipping cream (30-percent fat)', '1/2 stick butter', '1/2 teaspoon salt', '1/2 teaspoon vanilla extract']], ['title' => 'Marshmallows', 'data' => ['1/3 pound large marshmallows']], ['title' => 'Chocolate Fudge', 'data' => ['1 1/2 cups confectioners\' sugar', '2 tablespoons butter', '1 1/2 cups heavy cream (36-to38-percent fat)', '1/2 cup brown sugar', '1/2 teaspoon salt', '4 ounces unsweetened chocolate', '1/2 teaspoon vanilla extract']], ['title' => 'English Toffee', 'data' => ['1/4 cup English toffee pieces']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['For the crust: Preheat the oven to 340 degrees F. Break up the cookies into small pieces and press into a 9-by-9-inch baking pan. Brush with melted butter. Bake for 11 minutes. For the peanut butter fudge: Put the confectioners\' sugar in a large mixing bowl and set aside. Melt the butter in a small saucepan over medium heat. Stir in the brown sugar, whipping cream and salt. Bring to a boil. Boil for 2 minutes and remove from the heat. Stir in the peanut butter and vanilla. Pour the mixture over the confectioners\' sugar and mix. Spoon the mixture into the cookie pie crust until it is completely covered. For the caramel: In a small saucepan, combine the heavy cream, brown sugar, granulated sugar, corn syrup, whipping cream, butter and salt. Heat over low heat until the butter is completely melted. Gradually increase the heat to medium-high and bring the mixture to a boil, stirring frequently. Reduce the heat to medium and continue to boil, while stirring, until the temperature on a candy thermometer reads 250 degrees F. Remove from the heat, stir in the vanilla and pour over the peanut butter fudge. (You can double the recipe for this layer and pour half of the caramel into a buttered dish to cut up and enjoy as caramel candies.) For the marshmallows: In a microwave-safe bowl, melt the marshmallows in the microwave for 40 seconds. Working quickly, use a spatula to spread over the caramel layer. If you take too long, the marshmallows will set up and won\'t spread nicely. For the chocolate fudge: Put the confectioners\' sugar in a large mixing bowl and set aside. Melt the butter in a small saucepan over medium heat. Stir in the cream, brown sugar and salt. Bring to a boil. Boil for 2 minutes and remove from the heat. Stir in the chocolate and vanilla until all the chocolate is melted and the mixture is smooth. Pour the mixture over the confectioners\' sugar. Beat with an electric mixer for 3 to 4 minutes until very smooth. Spread evenly over the marshmallow layer with a spatula. For the toffee: Sprinkle the toffee over the top of the chocolate fudge. To serve: You do not have to wait for the fudge to set before serving. Using a metal spatula, cut and serve in cake-like squares. This recipe was provided by a chef, restaurant or culinary professional and may have been scaled down from a bulk recipe. The Food Network Kitchens chefs have not tested this recipe, in the proportions indicated, and therefore, we cannot make any representation as to the results.']]]);
     $recipe->setRecipeYield('16 4-inch squares');
     $recipe->setTotalTime(new DateInterval('PT1H20M'));
     $recipe->setUrl('http://www.cookingchanneltv.com/recipes/peanut-butter-pie-fudge.html');
     $crawler = $this->client->request('GET', 'http://www.cookingchanneltv.com/recipes/peanut-butter-pie-fudge.html');
     $scraper = new CookingChannelTVCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
 public function test_scrape_another_standard_recipe()
 {
     $recipe = new Recipe();
     $recipe->setDescription('This classic Italian egg dish is its country\'s answer to the French omelet -- but much more versatile. It\'s great for breakfast, lunch, and dinner, and delicious hot or at room temperature. Once you get the basics down, check out our variations below.');
     $recipe->setImage('http://assets.marthastewart.com/styles/wmax-520-highdpi/d20/frittata-062-d112989/frittata-062-d112989_vert.jpg?itok=7-jLdUlf');
     $recipe->setName('Perfect Frittata with Zucchini and Provolone');
     $recipe->setPrepTime(new DateInterval('PT25M'));
     $recipe->setRecipeIngredients([['title' => '', 'data' => ['3 tablespoons butter', '1 cup sliced scallions (about 6)', '3/4 teaspoon coarse salt, divided', '2 cups thinly sliced zucchini (about 1 medium)', '12 large eggs', '1/4 cup whole milk', '1/4 cup thinly sliced fresh basil', '1/4 teaspoon freshly ground pepper', '3/4 cup grated provolone (2 1/2 ounces)']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['Preheat broiler with rack 6 inches from heating element. Melt butter in a 10-inch broilerproof nonstick skillet over medium-high. Add scallions and 1/4 teaspoon salt; cook until tender, 2 to 5 minutes. Stir in zucchini and cook until tender, 4 to 8 minutes. (This ensures that the vegetables are cooked and won\'t release extra moisture, which would make the frittata tough and watery.)', 'Meanwhile, beat together eggs and milk with a fork (it gives you more speed and agility than a whisk here) until well combined. Stir in basil, 1/2 teaspoon salt, and pepper. Pour egg mixture into skillet; cook over medium-high, stirring with a spatula to create large curds, until eggs are wet on top but otherwise set throughout, 2 to 3 minutes.', 'Sprinkle with provolone, pressing about half down into eggs. Transfer to oven; broil until puffed and browning in spots and eggs are just set, 1 to 2 minutes. Let stand 10 minutes before slicing. Frittata can be served hot or at room temperature.']]]);
     $recipe->setRecipeYield('6 to 8');
     $recipe->setTotalTime(new DateInterval('PT35M'));
     $recipe->setUrl('http://www.marthastewart.com/1157761/perfect-frittata-zucchini-and-provolone');
     $crawler = $this->client->request('GET', 'http://www.marthastewart.com/1157761/perfect-frittata-zucchini-and-provolone');
     $scraper = new MarthaStewartCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
Пример #8
0
 public function test_scrape_another_recipe_with_ingredient_groups()
 {
     $recipe = new Recipe();
     $recipe->setAuthor('Lauren Salkeld');
     $recipe->setDescription('With a fudgy brownie bottom and rich layer of pumpkin cheesecake, these bars are on the must-make list for fall.');
     $recipe->setImage('http://del.h-cdn.co/assets/15/43/1600x800/landscape-1445292205-pumpkin-cheesecake-bars-1.jpg');
     $recipe->setName('Pumpkin Cheesecake Brownie Bars');
     $recipe->setPrepTime(new DateInterval('PT30M'));
     $recipe->setRecipeIngredients([['title' => 'For The Brownies', 'data' => ['1 c. (2 sticks) unsalted butter', '8 oz. semisweet chocolate, coarsely chopped', '2 c. sugar', '4 large eggs', '1 tbsp. pure vanilla extract', '1 1/4 c. all-purpose flour', '1 tsp. baking powder', '1/2 tsp. kosher salt', '1/2 c. chocolate chips']], ['title' => 'For The Cheesecake', 'data' => ['2 8-ounce packages cream cheese, at room temperature', '3/4 c. sugar', '1 1/2 tsp. pumpkin pie spice', '1/8 tsp. kosher salt', '2 tsp. pure vanilla extract', '1 c. canned pumpkin', '1/4 c. heavy cream', '1/4 c. sour cream']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['Make the brownies: Butter a 9-x-13" baking pan and line with parchment paper, leaving a 2" overhang on all sides. Butter the parchment. Set a rack in the middle of the oven and preheat to 350 degrees F.', 'In a bowl set over a pan of barely simmering water, melt chocolate and butter, stirring until smooth. Set aside to cool.', 'In a medium bowl, whisk together sugar, eggs, and vanilla. In a second medium bowl, whisk together flour, baking powder, and salt. Add sugar mixture to melted chocolate and whisk to combine. Add flour mixture and chocolate chips and gently fold until just combined and streak free.', 'Pour brownie batter into prepared baking pan and smooth top. Bake until just set, 12 to 15 minutes. Let cool on a wire rack. Reduce oven temperature to 325 degrees F.', 'Make the cheesecake: In the bowl of a stand mixer fitted with the paddle attachment (or a large bowl with a hand mixer), beat cream cheese on medium speed, scraping down bowl as necessary, until completely smooth, 3 to 4 minutes. Add pumpkin pie spice and salt and beat, scraping down bowl as necessary, until smooth and fluffy, 3 to 4 minutes. Add vanilla and beat 30 seconds. Add eggs one at a time, beating 1 minute after each addition and scraping down bowl as necessary. Add pumpkin, heavy cream, and sour cream and beat on low until completely smooth and streak-free, about 1 minute.', 'Pour cheesecake batter over cooled brownies and smooth top. Bake until set around the edges and just barely jiggling in the center, 45 minutes. Let cheesecake cool to room temperature on a wire rack. Once completely cool, loosely cover cheesecake with plastic wrap and chill in the refrigerator at least 3 hours, but preferably overnight.']]]);
     $recipe->setRecipeYield('24 bars');
     $recipe->setTotalTime(new DateInterval('PT6H15M'));
     $recipe->setUrl('http://www.delish.com/cooking/recipe-ideas/recipes/a44395/pumpkin-cheesecake-brownie-bars-recipe/');
     $crawler = $this->client->request('GET', 'http://www.delish.com/cooking/recipe-ideas/recipes/a44395/pumpkin-cheesecake-brownie-bars-recipe/');
     $scraper = new DelishCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
 public function test_scrape_another_recipe_with_ingredient_groups()
 {
     $recipe = new Recipe();
     $recipe->setAuthor('Leetal Arazi');
     $recipe->setDescription('These luscious doughnuts are crispy on the outside and very fluffy and airy on the inside. They\'re usually served dipped in sugar or honey, but Leetal and Ron Arazi love to serve them with a saffron and cardamom syrup.');
     $recipe->setImage('http://cdn-image.foodandwine.com/sites/default/files/styles/551x551/public/201412-xl-sfinj-moroccan-doughnuts.jpg?itok=ClS4JKuU');
     $recipe->setName('Sfinj (Moroccan Doughnuts)');
     $recipe->setPrepTime(new DateInterval('PT30M'));
     $recipe->setRecipeCategories(['Winter', 'Hannukah', 'Holiday Open House', 'Moroccan', 'Desserts', 'Vegetarian', 'Breakfast', 'Brunch']);
     $recipe->setRecipeIngredients([['title' => 'Sugar Syrup', 'data' => ['1 cup water', '1 cup sugar', '5 cardamom pods', 'Pinch of saffron threads']], ['title' => 'Doughnuts', 'data' => ['8 cups unbleached all-purpose flour', '2 tablespoons yeast', '2 teaspoons baking powder', '2 teaspoons salt', '1 teaspoon sugar', '3 to 4 cups water', 'Canola oil, for frying']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['Make the Sugar Syrup In a medium saucepan, combine all of the ingredients and bring to a boil. Reduce the heat and simmer until the syrup is the consistency of honey. (To test, place a few small plates in the freezer and drizzle a bit of the syrup on them throughout the cooking process.) Remove from the heat and let cool.', 'Make the Doughnuts In a large bowl, combine all of the dry ingredients. Add 3 1/2 cups of water and mix thoroughly; the dough should be loose and sticky and doesn’t need to hold its shape. Adjust the consistency if needed with the rest of the water. Cover the dough with cling plastic wrap and let rest for 30 minutes.', 'Make the Doughnuts In the bowl, using your hands, fold the dough over onto itself few times. Cover and let rise for 30 minutes, or until it doubles in volume. In a deep pan, heat 3 inches high of canola oil.', 'Make the Doughnuts Wet your hands and cut a piece of dough the size of 2 golf balls. With 2 fingers quickly make a hole in the center and stretch it a little to form a ring shape. Repeat to form the remaining doughnuts.', 'Make the Doughnuts Immediately and gently put the doughnuts in the oil and fry over moderate heat until golden on both sides. Drain the doughnuts on paper towels.', 'Make the Doughnuts Serve the sfinj immediately and let your guests drizzle them with the sugar syrup.']]]);
     $recipe->setTotalTime(new DateInterval('PT1H30M'));
     $recipe->setUrl('http://www.foodandwine.com/recipes/sfinj-moroccan-doughnuts');
     $crawler = $this->client->request('GET', 'http://www.foodandwine.com/recipes/sfinj-moroccan-doughnuts');
     $scraper = new FoodAndWineCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
 public function test_scrape_a_recipe_with_ingredient_groups()
 {
     $recipe = new Recipe();
     $recipe->setAuthor('Nestle® Beneful®');
     $recipe->setCookTime(new DateInterval('PT20M'));
     $recipe->setDescription('Apple slices, cider, thyme and mustard bring incredible, rich flavors to this easy chicken dinner. Wild or brown rice makes a perfect side dish.');
     $recipe->setImage('http://images.media-allrecipes.com/userphotos/720x405/2731461.jpg');
     $recipe->setName('Apple Cider Chicken with Wild Rice');
     $recipe->setPrepTime(new DateInterval('PT15M'));
     $recipe->setRecipeIngredients([['title' => 'Chicken', 'data' => ['3 skinless, boneless chicken breast halves, cut in half lengthwise to make thin cutlets', 'salt and ground black pepper to taste', '1 tablespoon canola oil or other neutral-flavor cooking oil', '1/4 cup shallots, minced', '1 tablespoon apple cider vinegar', '2 cups sweet apple cider', '1 tart apple, such as Granny Smith - peeled, cored and thinly sliced', '1 sweet apple, such as Gala or Fuji - peeled, cored and thinly sliced', '1 cup chicken broth', '3 teaspoons cornstarch', '2 tablespoons fresh thyme leaves', '1 teaspoon Dijon mustard', 'salt and pepper to taste']], ['title' => 'Sides', 'data' => ['3 cups cooked wild rice or brown rice, or combination of the two']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['Season chicken cutlets with salt and pepper.', 'Get a skillet very hot. Once it is hot, add oil to it and brown the chicken on both sides. Cook for about 5 minutes on each side, until it\'s a nice, golden color. Remove from the pan and set aside on a plate. It\'s okay that it\'s undercooked, it will finished cooking in the sauce.', 'Over high heat, brown the shallots.', 'Add cider vinegar and scrape the bottom of the pan, getting all the shallots and any leftover browned chicken bits.', 'Before the vinegar evaporates, add the cider and the apple slices. Let this reduce on high for about 3 minutes. The apples and shallots will get very tender.', 'While they reduce, mix the chicken broth and the cornstarch until there are no lumps left, then slowly add it to the bubbling cider and apples, stirring all the time while the sauce thickens.', 'Mix in thyme, mustard, salt and pepper.', 'Return the chicken and its juices back into the sauce, turn down to medium-low and summer for at least 10 minutes, or until the chicken is cooked all the way through. Serve with hot cooked rice.']]]);
     $recipe->setRecipeYield('4');
     $recipe->setTotalTime(new DateInterval('PT35M'));
     $recipe->setUrl('http://allrecipes.com/recipe/245148/apple-cider-chicken-with-wild-rice/');
     $crawler = $this->client->request('GET', 'http://allrecipes.com/recipe/245148/apple-cider-chicken-with-wild-rice/');
     $scraper = new AllRecipesCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }
 public function test_scrape_a_recipe_with_ingredient_and_instruction_groups()
 {
     $recipe = new Recipe();
     $recipe->setAuthor('Bobby Flay');
     $recipe->setCookTime(new DateInterval('PT25M'));
     $recipe->setImage('http://foodnetwork.sndimg.com/content/dam/images/food/fullset/2008/6/20/0/GrilledCornCob.jpg.rend.sni12col.landscape.jpeg');
     $recipe->setName('Perfectly Grilled Corn on the Cob');
     $recipe->setPrepTime(new DateInterval('PT1H10M'));
     $recipe->setRecipeCategories(['Corn', 'Side Dish', 'Grilling']);
     $recipe->setRecipeIngredients([['title' => '', 'data' => ['8 ears corn', 'Kosher salt', 'BBQ Butter, recipe follows', 'Herb Butter, recipe follows']], ['title' => 'Bbq Butter', 'data' => ['2 tablespoons canola oil', '1/2 small red onion, chopped', '2 cloves garlic, chopped', '2 teaspoons Spanish paprika', '1/2 teaspoon cayenne powder', '1 teaspoon toasted cumin seeds', '1 tablespoon ancho chili powder', '1/2 cup water', '1 1/2 sticks unsalted butter, slightly softened', '1 teaspoon Worcestershire sauce', 'Salt and freshly ground black pepper']], ['title' => 'Herb Butter', 'data' => ['2 sticks unsalted butter, at room temperature', '1/4 cup chopped fresh herbs (basil, chives or tarragon)', '1 teaspoon kosher salt', 'Freshly ground black pepper']]]);
     $recipe->setRecipeInstructions([['title' => '', 'data' => ['Heat the grill to medium.', 'Pull the outer husks down the ear to the base. Strip away the silk from each ear of corn by hand. Fold husks back into place, and place the ears of corn in a large bowl of cold water with 1 tablespoon of salt for 10 minutes.', 'Remove corn from water and shake off excess. Place the corn on the grill, close the cover and grill for 15 to 20 minutes, turning every 5 minutes, or until kernels are tender when pierced with a paring knife. Remove the husks and eat on the cob or remove the kernels. Serve with the BBQ Butter and/or Herb Butter. Spread over the corn while hot.']], ['title' => 'Bbq Butter', 'data' => ['Heat the oil in a medium saute pan over high heat until almost smoking. Add the onion and cook until soft, 2 to 3 minutes. Add the garlic and cook for 30 seconds. Add the paprika, cayenne, cumin and ancho powder and cook for 1 minute. Add 1/2 cup of water and cook until the mixture becomes thickened and the water reduces. Let cool slightly.', 'Place the butter in a food processor, add the spice mixture and Worcestershire sauce and process until smooth. Season with salt and pepper, scrape the mixture into a small bowl, cover and refrigerate for at least 30 minutes to allow the flavors to meld. Bring to room temperature before serving.']], ['title' => 'Herb Butter', 'data' => ['Combine in a food processor and process until smooth.']]]);
     $recipe->setRecipeYield('4 to 6');
     $recipe->setTotalTime(new DateInterval('PT1H35M'));
     $recipe->setUrl('http://www.foodnetwork.com/recipes/bobby-flay/perfectly-grilled-corn-on-the-cob-recipe.html');
     $crawler = $this->client->request('GET', 'http://www.foodnetwork.com/recipes/bobby-flay/perfectly-grilled-corn-on-the-cob-recipe.html');
     $scraper = new FoodNetworkCom($crawler);
     $this->assertEquals($recipe, $scraper->scrape());
 }