]>
git.immae.eu Git - github/shaarli/Shaarli.git/blob - tests/Updater/DummyUpdater.php
3 require_once 'application/Updater.php';
7 * Extends Updater to add update method designed for unit tests.
9 class DummyUpdater
extends Updater
14 * @param array $doneUpdates Updates which are already done.
15 * @param LinkDB $linkDB LinkDB instance.
16 * @param boolean $isLoggedIn True if the user is logged in.
18 public function __construct($doneUpdates, $linkDB, $isLoggedIn)
20 parent
::__construct($doneUpdates, $linkDB, $isLoggedIn);
22 // Retrieve all update methods.
23 // For unit test, only retrieve final methods,
24 $class = new ReflectionClass($this);
25 $this->methods
= $class->getMethods(ReflectionMethod
::IS_FINAL
);
33 private final function updateMethodDummy1()
43 private final function updateMethodDummy2()
53 private final function updateMethodDummy3()
59 * Update method 4, raise an exception.
61 * @throws Exception error.
63 private final function updateMethodException()
65 throw new Exception('whatever');