Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / console / Tests / Helper / TableTest.php
index d8a8ff00875b24205f7d7f4b9e9c6ebf8798b5a7..b195e09acb8b08a853b9e44757beeba7f99306db 100644 (file)
@@ -726,6 +726,22 @@ TABLE;
         $this->assertEquals($expected, $this->getOutputContent($output));
     }
 
+    /**
+     * @expectedException \Symfony\Component\Console\Exception\InvalidArgumentException
+     * @expectedExceptionMessage A cell must be a TableCell, a scalar or an object implementing __toString, array given.
+     */
+    public function testThrowsWhenTheCellInAnArray()
+    {
+        $table = new Table($output = $this->getOutputStream());
+        $table
+            ->setHeaders(array('ISBN', 'Title', 'Author', 'Price'))
+            ->setRows(array(
+                array('99921-58-10-7', array(), 'Dante Alighieri', '9.95'),
+            ));
+
+        $table->render();
+    }
+
     public function testColumnWith()
     {
         $table = new Table($output = $this->getOutputStream());