Remove the icon for now

This commit is contained in:
Joas Schilling 2015-11-16 16:17:23 +01:00
parent 1666af89c2
commit 40d5d55124
6 changed files with 0 additions and 141 deletions

View file

@ -153,28 +153,6 @@ class Action implements IAction {
return $this->requestType;
}
/**
* @param string $icon
* @return $this
* @throws \InvalidArgumentException if the icon is invalid
* @since 8.2.0
*/
public function setIcon($icon) {
if (!is_string($icon) || $icon === '' || isset($icon[64])) {
throw new \InvalidArgumentException('The given icon is invalid');
}
$this->icon = $icon;
return $this;
}
/**
* @return string
* @since 8.2.0
*/
public function getIcon() {
return $this->icon;
}
/**
* @return bool
*/

View file

@ -94,20 +94,6 @@ interface IAction {
*/
public function getRequestType();
/**
* @param string $icon
* @return $this
* @throws \InvalidArgumentException if the icon is invalid
* @since 8.2.0
*/
public function setIcon($icon);
/**
* @return string
* @since 8.2.0
*/
public function getIcon();
/**
* @return bool
* @since 8.2.0

View file

@ -179,20 +179,6 @@ interface INotification {
*/
public function getLink();
/**
* @param string $icon
* @return $this
* @throws \InvalidArgumentException if the icon are invalid
* @since 8.2.0
*/
public function setIcon($icon);
/**
* @return string
* @since 8.2.0
*/
public function getIcon();
/**
* @return IAction
* @since 8.2.0

View file

@ -335,28 +335,6 @@ class Notification implements INotification {
return $this->link;
}
/**
* @param string $icon
* @return $this
* @throws \InvalidArgumentException if the icon are invalid
* @since 8.2.0
*/
public function setIcon($icon) {
if (!is_string($icon) || $icon === '' || isset($icon[64])) {
throw new \InvalidArgumentException('The given icon is invalid');
}
$this->icon = $icon;
return $this;
}
/**
* @return string
* @since 8.2.0
*/
public function getIcon() {
return $this->icon;
}
/**
* @return IAction
* @since 8.2.0

View file

@ -171,47 +171,6 @@ class ActionTest extends TestCase {
$this->action->setLink($link, $type);
}
public function dataSetIcon() {
return [
['test1'],
[str_repeat('a', 1)],
[str_repeat('a', 64)],
];
}
/**
* @dataProvider dataSetIcon
* @param string $icon
*/
public function testSetIcon($icon) {
$this->assertSame('', $this->action->getIcon());
$this->action->setIcon($icon);
$this->assertSame($icon, $this->action->getIcon());
}
public function dataSetIconInvalid() {
return [
[true],
[false],
[0],
[1],
[''],
[str_repeat('a', 65)],
[[]],
[[str_repeat('a', 65)]],
];
}
/**
* @dataProvider dataSetIconInvalid
* @param string $icon
*
* @expectedException \InvalidArgumentException
*/
public function testSetIconInvalid($icon) {
$this->action->setIcon($icon);
}
public function testIsValid() {
$this->assertFalse($this->action->isValid());
$this->assertFalse($this->action->isValidParsed());

View file

@ -371,34 +371,6 @@ class NotificationTest extends TestCase {
$this->notification->setLink($link);
}
public function dataSetIcon() {
return $this->dataValidString(64);
}
/**
* @dataProvider dataSetIcon
* @param string $icon
*/
public function testSetIcon($icon) {
$this->assertSame('', $this->notification->getIcon());
$this->notification->setIcon($icon);
$this->assertSame($icon, $this->notification->getIcon());
}
public function dataSetIconInvalid() {
return $this->dataInvalidString(64);
}
/**
* @dataProvider dataSetIconInvalid
* @param mixed $icon
*
* @expectedException \InvalidArgumentException
*/
public function testSetIconInvalid($icon) {
$this->notification->setIcon($icon);
}
public function testCreateAction() {
$action = $this->notification->createAction();
$this->assertInstanceOf('OC\Notification\IAction', $action);