From 6aedb4f475ba320250393b725f3517f05188ebce Mon Sep 17 00:00:00 2001
From: Dominic Milburn <dominic.milburn@steeloctopus.com>
Date: Wed, 29 Jan 2014 14:02:40 +1100
Subject: [PATCH] - Added in phpUnit test for verification of correct process

---
 .../tests/Drupal/block/Tests/BlockBaseTest.php     | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/core/modules/block/tests/Drupal/block/Tests/BlockBaseTest.php b/core/modules/block/tests/Drupal/block/Tests/BlockBaseTest.php
index f0d04ec..0f7cffb 100644
--- a/core/modules/block/tests/Drupal/block/Tests/BlockBaseTest.php
+++ b/core/modules/block/tests/Drupal/block/Tests/BlockBaseTest.php
@@ -58,4 +58,31 @@ public function testGetMachineNameSuggestion() {
     $this->assertEquals('uberawesome', $block_base->getMachineNameSuggestion());
   }
 
+  /**
+   * Test the construction of the abstract class and return of configuration array
+   *
+   * @see \Drupal\block\BlockBase->getConfigruation().
+   */
+  public function testGetConfiguration() {
+
+    $config = array(
+      'configuration'=>array('cache'=>1,'another_config_var'=>'custom_config_var'),
+      'plugin_id'=>'test_id',
+      'plugin_definition'=>array(
+        'admin_label' => 'Admin label', 'module' => 'block_test'
+      ),
+    );
+
+    $stub = $this->getMockForAbstractClass('Drupal\block\BlockBase',$config);
+
+    $expected = array(
+      'cache'=>1,
+      'label'=>'',
+      'module'=>"block_test",
+      'label_display'=>'visible',
+      'another_config_var'=>'custom_config_var');
+
+    $this->assertEquals($expected, $stub->getConfiguration());
+  }
+
 }
-- 
1.8.4.2

