blob: 4daba1eed166bea912e8481466a5735cad8fed8e [file] [log] [blame]
atoulmeb80b4682009-01-22 13:08:36 +00001<?php
2/*******************************************************************************
3 * Copyright (c) 2007-2009 Intalio, Inc.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Antoine Toulme, Intalio Inc.
11*******************************************************************************/
12
atoulmeb80b4682009-01-22 13:08:36 +000013
14require("../spec_helper.php");
atoulme12882d52009-01-26 18:39:17 +000015require(dirname(__FILE__) . "/../../classes/system/addons_management.php");
atoulmeb80b4682009-01-22 13:08:36 +000016
atoulme13073032009-01-27 16:31:27 +000017global $addon;
18$addon = new AddonsManagement('reference');
19$addon->load_html_functions();
atoulmeb80b4682009-01-22 13:08:36 +000020
21class DescribeAddonsHtmlFunctionsLoading extends PHPSpec_Context {
22
atoulmeb80b4682009-01-22 13:08:36 +000023 public function before() {
atoulme13073032009-01-27 16:31:27 +000024
atoulmeb80b4682009-01-22 13:08:36 +000025 }
26
27 public function itShouldHaveAddedAHookForImageRoot() {
atoulme13073032009-01-27 16:31:27 +000028 global $addon;
29 $this->spec($addon->hook("image_root"))->shouldNot->beNull();
30 $this->spec(call_user_func($addon->hook("image_root")))->should->equal("http://dev.eclipse.org");
atoulmeb80b4682009-01-22 13:08:36 +000031 }
32
33 public function itShouldProvideAWayToValidateTheUrlOfAMapFile() {
atoulme13073032009-01-27 16:31:27 +000034 global $addon;
35 $this->spec($addon->hook("validate_map_file_url"))->shouldNot->beNull();
36 $this->spec(call_user_func($addon->hook("validate_map_file_url")))->should->beTrue();
atoulmeb80b4682009-01-22 13:08:36 +000037 }
38
39
40}
41
42?>